CTerrorPlayer::MaterializeFromGhost
0x009c27a0 · 585 bytes · __thiscall
_ZN13CTerrorPlayer20MaterializeFromGhostEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::MaterializeFromGhost() */
void __thiscall CTerrorPlayer::MaterializeFromGhost(CTerrorPlayer *this)
{
code *pcVar1;
uint uVar2;
int iVar3;
undefined4 uVar4;
undefined4 uVar5;
int *piVar6;
int iVar7;
int iVar8;
undefined *puVar9;
CTerrorPlayer *pCVar10;
byte bVar11;
bVar11 = 0;
uVar4 = (**(code **)(*(int *)this + 0x544))(this);
uVar4 = ZombieClassName(uVar4);
uVar5 = (**(code **)(*(int *)this + 0xb8))(this);
UTIL_LogPrintf("%s materialized from spawn mode as a %s\n",uVar5,uVar4);
iVar8 = 0;
do {
iVar3 = iVar8 + 0x2f78;
iVar8 = iVar8 + 0x34;
pCVar10 = this + iVar3;
for (iVar7 = 0xd; iVar7 != 0; iVar7 = iVar7 + -1) {
*(undefined4 *)pCVar10 = 0;
pCVar10 = pCVar10 + (uint)bVar11 * -8 + 4;
}
} while (iVar8 != 0x104);
CCSPlayer::EmitPrivateSound((CCSPlayer *)this,"PlayerZombie.BecomeReal");
CCSPlayer::State_Transition((CCSPlayer *)this,0);
uVar4 = (**(code **)(*(int *)this + 0x544))(this);
switch(uVar4) {
case 1:
(**(code **)(*(int *)(this + 0x3ab4) + 0x94))(this + 0x3ab4);
break;
case 2:
EmitTrackedSound(this,"BoomerZombie.Gurgle",0.0);
(**(code **)(*(int *)(this + 0x3ab4) + 0x84))(this + 0x3ab4);
VisibilityMonitor_AddEntity
((CBaseEntity *)this,*(float *)(BoomerNearDist._28_4_ + 0x2c),
BoomerVisibilityMonitorCallback,(_func_bool_CBaseEntity_ptr_CBasePlayer_ptr *)0x0);
break;
case 3:
(**(code **)(*(int *)(this + 0x3ab4) + 0xa8))(this + 0x3ab4);
break;
case 4:
(**(code **)(*(int *)(this + 0x3ab4) + 0xcc))(this + 0x3ab4);
break;
case 5:
(**(code **)(*(int *)(this + 0x3ab4) + 0xbc))(this + 0x3ab4);
break;
case 6:
(**(code **)(*(int *)(this + 0x3ab4) + 0xe4))(this + 0x3ab4);
}
CBaseEntity::PhysicsRemoveTouchedList((CBaseEntity *)this);
piVar6 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"player_spawn",0,0);
if (piVar6 != (int *)0x0) {
pcVar1 = *(code **)(*piVar6 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
(*pcVar1)(piVar6,"userid",uVar4);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar6,0);
}
uVar2 = *(uint *)(this + 0x30bc);
if ((((uVar2 != 0xffffffff) &&
(puVar9 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar9 + 8) == uVar2 >> 0xc)) &&
(piVar6 = *(int **)(puVar9 + 4), piVar6 != (int *)0x0)) {
(**(code **)(*piVar6 + 0x340))(piVar6,0x3f800000);
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.