CTeamplayRoundBasedRules::RoundRespawn
0x004cbaa0 · 481 bytes · __thiscall
_ZN24CTeamplayRoundBasedRules12RoundRespawnEv
Decompiled
undefined (1 param)
/* CTeamplayRoundBasedRules::RoundRespawn() */
void __thiscall CTeamplayRoundBasedRules::RoundRespawn(CTeamplayRoundBasedRules *this)
{
char cVar1;
int iVar2;
int *piVar3;
CTeamplayRoundBasedRules *__s1;
int iVar4;
*(undefined4 *)(this + 0x30c) = *(undefined4 *)(gpGlobals + 0xc);
if ((this[0x268] != (CTeamplayRoundBasedRules)0x0) ||
(this[0x269] != (CTeamplayRoundBasedRules)0x0)) {
(**(code **)(*(int *)this + 0x300))(this);
*(undefined4 *)(this + 0x27c) = 0;
*(undefined4 *)(this + 0x46c) = 0;
}
iVar4 = 0;
__s1 = this + 0x3d8;
do {
if (0.0 < *(float *)(__s1 + -0x150) || *(float *)(__s1 + -0x150) == 0.0) {
iVar2 = memcmp(__s1,__s1 + -0x150,4);
if (iVar2 != 0) {
CGameRulesProxy::NotifyNetworkStateChanged();
*(undefined4 *)(this + 0x3d8 + iVar4 * 4) = *(undefined4 *)(__s1 + -0x150);
}
}
iVar4 = iVar4 + 1;
__s1 = __s1 + 4;
} while (iVar4 != 0x20);
if ((this[0x328] == (CTeamplayRoundBasedRules)0x0) &&
(this[0x268] != (CTeamplayRoundBasedRules)0x0)) {
UTIL_LogPrintf("World triggered \"Round_Start\"\n");
}
(**(code **)(*(int *)this + 0x2a8))(this);
if (this[0x31e] != (CTeamplayRoundBasedRules)0x0) {
CGameRulesProxy::NotifyNetworkStateChanged();
this[0x31e] = (CTeamplayRoundBasedRules)0x0;
}
cVar1 = (**(code **)(*(int *)this + 0x274))(this);
if (cVar1 != '\0') {
if (this[0x31e] != (CTeamplayRoundBasedRules)0x1) {
CGameRulesProxy::NotifyNetworkStateChanged();
this[0x31e] = (CTeamplayRoundBasedRules)0x1;
}
(**(code **)(*(int *)this + 0x278))(this);
(**(code **)(*(int *)this + 0x270))(this,0);
}
cVar1 = (**(code **)(*(int *)this + 0x280))(this);
if (cVar1 != '\0') {
(**(code **)(*(int *)this + 0x284))(this);
(**(code **)(*(int *)this + 0x27c))(this,0);
}
RespawnPlayers(this,true,false,0);
iVar4 = 1;
do {
piVar3 = (int *)UTIL_PlayerByIndex(iVar4);
if (piVar3 != (int *)0x0) {
cVar1 = (**(code **)(*piVar3 + 0x16c))(piVar3);
if (cVar1 != '\0') {
(**(code **)(*piVar3 + 0x75c))(piVar3);
}
}
iVar4 = iVar4 + 1;
} while (iVar4 != 0x21);
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.