CTerrorPlayer::GetIntoGame
0x009d2a40 · 401 bytes · __thiscall
_ZN13CTerrorPlayer11GetIntoGameEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::GetIntoGame() */
undefined4 __thiscall CTerrorPlayer::GetIntoGame(CTerrorPlayer *this)
{
CBaseEdict *this_00;
code *pcVar1;
int *piVar2;
char cVar3;
int iVar4;
int iVar5;
undefined4 uVar6;
undefined4 *puVar7;
piVar2 = g_pGameRules;
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
puVar7 = (undefined4 *)&stack0xffffffc4;
if (((cVar3 != '\0') && (puVar7 = (undefined4 *)&stack0xffffffc4, *(int *)(this + 0x2eac) != 8))
&& (cVar3 = (**(code **)(*piVar2 + 0x118))(), puVar7 = (undefined4 *)&stack0xffffffc4,
cVar3 != '\0')) {
iVar4 = ChooseSurvivorCharacter();
if (iVar4 + 1 != *(int *)(this + 0x290c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x290c) = iVar4 + 1;
}
GetSurvivorModelName();
(**(code **)(*(int *)this + 0x20))();
puVar7 = (undefined4 *)&stack0xffffffc0;
(**(code **)(*(int *)this + 0xb8))();
UTIL_LogPrintf("(SKIN) Survivor %s changed model from %s to %s via GetIntoGame\n");
(**(code **)(*(int *)this + 0x70))();
(**(code **)(*(int *)this + 0x920))();
}
*puVar7 = this;
puVar7[-1] = 0x9d2b57;
uVar6 = CCSPlayer::GetIntoGame((CCSPlayer *)*puVar7);
if ((char)uVar6 != '\0') {
*puVar7 = this;
puVar7[-1] = 0x9d2b78;
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)*puVar7);
if (iVar4 == 2) {
if ((*(int *)(this + 0x30d8) == 0) || ((*(byte *)(*(int *)(this + 0x30d8) + 300) & 0x80) != 0)
) {
iVar4 = *(int *)(this + 0xfc);
if (iVar4 == *(int *)(this + 0x100)) {
return uVar6;
}
}
else {
iVar4 = *(int *)(ZombieSurvivorRespawnHealth._28_4_ + 0x30);
if (iVar4 == *(int *)(this + 0x100)) {
return uVar6;
}
}
iVar5 = *(int *)this;
*puVar7 = this;
puVar7[1] = this + 0x100;
pcVar1 = *(code **)(iVar5 + 0x214);
puVar7[-1] = 0x9d2bb5;
(*pcVar1)();
*(int *)(this + 0x100) = iVar4;
}
}
return uVar6;
}
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.