ForEachTerrorPlayer<FinaleLossSetup>
0x0088de10 · 687 bytes · __cdecl
_Z19ForEachTerrorPlayerI15FinaleLossSetupEbRT_
Decompiled
bool (1 param)
/* bool ForEachTerrorPlayer<FinaleLossSetup>(FinaleLossSetup&) */
bool ForEachTerrorPlayer<FinaleLossSetup>(FinaleLossSetup *param_1)
{
char cVar1;
CBaseEntity *this;
CBaseEntity *pCVar2;
int iVar3;
int iVar4;
uint uVar5;
int local_20 [4];
iVar4 = 1;
if (0 < *(int *)(gpGlobals + 0x14)) {
do {
this = (CBaseEntity *)UTIL_PlayerByIndex(iVar4);
if ((((this != (CBaseEntity *)0x0) && (*(int *)(this + 0x30) != 0)) &&
(*(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0)) &&
((cVar1 = (**(code **)(*(int *)this + 0x16c))(this), cVar1 != '\0' &&
(*(int *)(this + 0x1f6c) != 2)))) {
CBaseEntity::SetAbsVelocity(this,(Vector *)&vec3_origin);
CBasePlayer::EnableControl((CBasePlayer *)this,false);
(**(code **)(*(int *)this + 0x580))(this,"specmenu",0,0);
(**(code **)(*(int *)this + 0x580))(this,"specgui",0,0);
(**(code **)(*(int *)this + 0x580))(this,"spawnmode_bar",0,0);
(**(code **)(*(int *)this + 0x580))(this,"overview",0,0);
if (((cameraFinaleLossStr == 0) ||
(iVar3 = cameraFinaleLossStr, DAT_0100026c != CGameString::gm_iSerialNumber)) &&
(iVar3 = 0, DAT_01000268 != 0)) {
AllocPooledString((char *)local_20);
cameraFinaleLossStr = local_20[0];
DAT_0100026c = CGameString::gm_iSerialNumber;
iVar3 = local_20[0];
}
pCVar2 = (CBaseEntity *)
CGlobalEntityList::FindEntityByNameFast((CGlobalEntityList *)gEntList,0,iVar3);
if (pCVar2 == (CBaseEntity *)0x0) {
if (((cameraFinaleStr == 0) ||
(iVar3 = cameraFinaleStr, DAT_0100027c != CGameString::gm_iSerialNumber)) &&
(iVar3 = 0, DAT_01000278 != 0)) {
AllocPooledString((char *)local_20);
cameraFinaleStr = local_20[0];
DAT_0100027c = CGameString::gm_iSerialNumber;
iVar3 = local_20[0];
}
pCVar2 = (CBaseEntity *)
CGlobalEntityList::FindEntityByNameFast((CGlobalEntityList *)gEntList,0,iVar3);
if (pCVar2 != (CBaseEntity *)0x0) goto LAB_0088df99;
}
else {
LAB_0088df99:
if (this[0x1ac8] != (CBaseEntity)0x0) {
(**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1ac8);
this[0x1ac8] = (CBaseEntity)0x0;
}
CBasePlayer::SetViewEntity((CBasePlayer *)this,pCVar2);
uVar5 = *(uint *)(this + 0x1a7c) | 0x77b;
if (*(uint *)(this + 0x1a7c) != uVar5) {
(**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1a7c);
*(uint *)(this + 0x1a7c) = uVar5;
}
}
iVar3 = CBaseEntity::GetTeamNumber(this);
if (iVar3 == 3) {
CTerrorPlayer::ReleaseTongueVictim((CTerrorPlayer *)this,false);
}
}
iVar4 = iVar4 + 1;
} while (iVar4 <= *(int *)(gpGlobals + 0x14));
}
return true;
}
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.