CTerrorPlayer::OnGroundChanged
0x009ac220 · 557 bytes · __thiscall
_ZN13CTerrorPlayer15OnGroundChangedEP11CBaseEntityS1_
Decompiled
undefined (3 params)
/* CTerrorPlayer::OnGroundChanged(CBaseEntity*, CBaseEntity*) */
void __thiscall
CTerrorPlayer::OnGroundChanged(CTerrorPlayer *this,CBaseEntity *param_1,CBaseEntity *param_2)
{
uint uVar1;
int *piVar2;
char cVar3;
int iVar4;
undefined *puVar5;
CBaseEntity *this_00;
undefined4 local_30 [3];
undefined4 local_24;
undefined4 local_20;
if (param_1 == (CBaseEntity *)0x0) {
if (param_2 == (CBaseEntity *)0x0) {
return;
}
StopTrackedSound(this,"Player.Fall");
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (((((iVar4 == 3) && (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 == 3)) &&
(this[0x1a90] != (CTerrorPlayer)0x0)) &&
((uVar1 = *(uint *)(this + 0x30bc), uVar1 != 0xffffffff &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)))) &&
((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
(piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0)))) {
(**(code **)(*piVar2 + 0x368))(piVar2);
}
}
else if (param_2 == (CBaseEntity *)0x0) {
return;
}
uVar1 = *(uint *)(this + 0x2088);
this_00 = (CBaseEntity *)0x0;
if (((uVar1 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
cVar3 = (**(code **)(*(int *)this + 300))(this);
}
else {
this_00 = *(CBaseEntity **)(puVar5 + 4);
cVar3 = (**(code **)(*(int *)this + 300))(this);
}
if ((((cVar3 != '\0') &&
(*(float *)(this + 0x1aa4) <= FatalFallSpeed && FatalFallSpeed != *(float *)(this + 0x1aa4)))
&& (this_00 != (CBaseEntity *)this)) &&
((this_00 != (CBaseEntity *)0x0 &&
((*(char **)(this_00 + 0x7c) == "point_deathfall_camera" ||
(cVar3 = CBaseEntity::ClassMatchesComplex(this_00,"point_deathfall_camera"), cVar3 != '\0')))
))) {
CBasePlayer::ClearZoomOwner((CBasePlayer *)this);
CBasePlayer::SetFOV((CBasePlayer *)this,(CBaseEntity *)this,0,0.0,0);
CBasePlayer::SetViewEntity((CBasePlayer *)this,(CBaseEntity *)0x0);
}
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if ((cVar3 != '\0') &&
((*(char **)(param_2 + 0x7c) == "prop_car_alarm" ||
(cVar3 = CBaseEntity::ClassMatchesComplex(param_2,"prop_car_alarm"), cVar3 != '\0')))) {
local_30[0] = 0;
local_24 = 0xffffffff;
local_20 = 0;
(**(code **)(*(int *)param_2 + 0xb4))(param_2,"SurvivorStandingOnCar",this,this,local_30,0);
return;
}
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.