CTerrorPlayer::SetCurrentReviveCount
0x009ec440 · 294 bytes · __thiscall
_ZN13CTerrorPlayer21SetCurrentReviveCountEi
Decompiled
undefined (2 params)
/* CTerrorPlayer::SetCurrentReviveCount(int) */
void __thiscall CTerrorPlayer::SetCurrentReviveCount(CTerrorPlayer *this,int param_1)
{
CBaseEdict *pCVar1;
char cVar2;
CTerrorPlayer CVar3;
char cVar4;
int iVar5;
cVar4 = '\0';
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar2 = IsASurvivorTeam(iVar5);
if (cVar2 != '\0') {
cVar4 = IsOnThirdStrike(this);
}
if (param_1 != *(int *)(this + 0x2e54)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x2e54) = param_1;
}
CVar3 = (CTerrorPlayer)IsOnThirdStrike(this);
if (CVar3 != this[0x2e58]) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
this[0x2e58] = CVar3;
}
cVar2 = IsOnThirdStrike(this);
if (cVar2 == '\0') {
if (cVar4 == '\0') {
return;
}
StopTrackedSound(this,"Player.Heartbeat");
return;
}
StopTrackedSound(this,"Player.Heartbeat");
CCSPlayer::EmitPrivateSound((CCSPlayer *)this,"Player.Heartbeat");
TrackSound(this,"Player.Heartbeat");
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.