CCarProp::FireGameEvent
0x007fdcd0 · 479 bytes · __thiscall
_ZN8CCarProp13FireGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* CCarProp::FireGameEvent(IGameEvent*) */
void __thiscall CCarProp::FireGameEvent(CCarProp *this,IGameEvent *param_1)
{
float fVar1;
int iVar2;
CBaseEntity *this_00;
longdouble lVar3;
undefined1 local_14 [12];
if ((((this[0x1710] == (CCarProp)0x0) && (this[0x1711] == (CCarProp)0x0)) &&
(this[0x16f5] == (CCarProp)0x0)) && (this[0x16f4] == (CCarProp)0x0)) {
if ((0.0 < *(float *)(this + 0x1700)) &&
(lVar3 = (longdouble)CountdownTimer::Now(), (float)lVar3 < *(float *)(this + 0x1700))) {
return;
}
if ((0.0 < *(float *)(this + 0x170c)) &&
(lVar3 = (longdouble)CountdownTimer::Now(), (float)lVar3 < *(float *)(this + 0x170c))) {
return;
}
iVar2 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
this_00 = (CBaseEntity *)UTIL_PlayerByUserId(iVar2);
if (this_00 != (CBaseEntity *)0x0) {
fVar1 = *(float *)(car_alarm_chirp_distance._28_4_ + 0x2c);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
if ((*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) *
(*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) +
(*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) *
(*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) +
(*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) *
(*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) < fVar1 * fVar1) {
CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)ChirpStartThink);
this[0x16f4] = (CCarProp)0x1;
}
}
}
return;
}
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.