FireTerrorBullets
0x0052cd70 · 485 bytes · __cdecl
_Z17FireTerrorBulletsiRK6VectorRK6QAngle10CSWeaponIDiif
Decompiled
undefined (7 params)
/* FireTerrorBullets(int, Vector const&, QAngle const&, CSWeaponID, int, int, float) */
void FireTerrorBullets(int param_1,Vector *param_2,QAngle *param_3,int param_4,int param_5,
int param_6,float param_7)
{
char cVar1;
short sVar2;
short sVar3;
CBaseEntity *this;
int iVar4;
int in_GS_OFFSET;
char local_a0 [128];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
this = (CBaseEntity *)UTIL_PlayerByIndex(param_1);
if (this != (CBaseEntity *)0x0) {
cVar1 = (**(code **)(*(int *)this + 0x16c))(this);
if (cVar1 != '\0') {
iVar4 = WeaponIDToAlias(param_4);
if (iVar4 == 0) {
DevMsg("FireTerrorBullets: weapon alias for ID %d not found\n",param_4);
}
else {
V_snprintf(local_a0,0x80,"weapon_%s",iVar4);
sVar2 = LookupWeaponInfoSlot(local_a0);
sVar3 = GetInvalidWeaponInfoHandle();
if (sVar2 == sVar3) {
DevMsg("FireTerrorBullets: LookupWeaponInfoSlot failed for weapon %s\n",local_a0);
}
else {
iVar4 = CBaseEntity::IsDormant(this);
if (iVar4 == 0) {
if (param_5 == 0) {
(**(code **)(*(int *)this + 0x7fc))(this,0x28);
}
else {
(**(code **)(*(int *)this + 0x7fc))(this,0x29,0);
}
}
TE_FireBullets(param_1,param_2,param_3,param_4,param_5,param_6,param_7);
(**(code **)(*(int *)this + 0x844))(this);
CCSPlayer::StartNewBulletGroup();
(**(code **)*lagcompensation)(lagcompensation,this,2,&vec3_origin,&vec3_angle,0);
CTerrorPlayer::FireBullet
(this,*(undefined4 *)param_2,*(undefined4 *)(param_2 + 4),
*(undefined4 *)(param_2 + 8),param_3,param_4,0);
(**(code **)(*lagcompensation + 4))(lagcompensation,this);
}
}
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.