CCSGameRules::FPlayerCanRespawn
0x00434080 · 317 bytes · __thiscall
_ZN12CCSGameRules17FPlayerCanRespawnEP11CBasePlayer
Decompiled
undefined (2 params)
/* CCSGameRules::FPlayerCanRespawn(CBasePlayer*) */
undefined4 __thiscall CCSGameRules::FPlayerCanRespawn(CCSGameRules *this,CBasePlayer *param_1)
{
char cVar1;
int iVar2;
int *piVar3;
undefined4 uVar4;
color32_s local_10;
undefined1 local_f;
undefined1 local_e;
undefined1 local_d;
if ((param_1 == (CBasePlayer *)0x0) ||
(cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar1 == '\0')) {
param_1 = (CBasePlayer *)0x0;
Error("FPlayerCanRespawn: pPlayer=0");
}
if (((((*(int *)(param_1 + 0x23e4) < 1) || (this[0x27c] == (CCSGameRules)0x0)) &&
(*(float *)(this + 0x268) < *(float *)(gpGlobals + 0xc) ||
*(float *)(this + 0x268) == *(float *)(gpGlobals + 0xc))) &&
((iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1), iVar2 == 3 ||
(iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1), iVar2 == 2)))) &&
(*(int *)(param_1 + 0x290c) != 0)) {
piVar3 = (int *)GetGlobalTeam(3);
uVar4 = (**(code **)(*piVar3 + 0x354))(piVar3);
*(undefined4 *)(this + 0x270) = uVar4;
piVar3 = (int *)GetGlobalTeam(2);
iVar2 = (**(code **)(*piVar3 + 0x354))(piVar3);
*(int *)(this + 0x26c) = iVar2;
if (((iVar2 < 1) || (*(int *)(this + 0x270) < 1)) ||
(*(float *)(gpGlobals + 0xc) <= *(float *)(this + 0x244) + 20.0)) {
return 1;
}
local_10 = (color32_s)0x0;
local_f = 0;
local_e = 0;
local_d = 0xff;
if (*(int *)(mp_fadetoblack._28_4_ + 0x30) != 0) {
UTIL_ScreenFade((CBaseEntity *)param_1,&local_10,3.0,3.0,10);
}
}
return 0;
}
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.