CTerrorPlayer::CheckpointRespawn
0x0086a5e0 · 641 bytes · __thiscall
_ZN13CTerrorPlayer17CheckpointRespawnEPK10Checkpoint
Decompiled
undefined (2 params)
/* CTerrorPlayer::CheckpointRespawn(Checkpoint const*) */
void __thiscall CTerrorPlayer::CheckpointRespawn(CTerrorPlayer *this,Checkpoint *param_1)
{
CBaseEdict *pCVar1;
char cVar2;
CTerrorPlayer CVar3;
char cVar4;
undefined4 uVar5;
int iVar6;
uVar5 = (**(code **)(*(int *)this + 0xb8))(this);
UTIL_LogPrintf("CheckpointRespawn for %s\n",uVar5);
g_RespawningCheckpoint = param_1;
CCSPlayer::State_Transition((CCSPlayer *)this,0);
(**(code **)(*(int *)this + 100))(this);
iVar6 = (**(code **)(*(int *)this + 0x52c))(this);
if ((iVar6 != 0) && ((*(byte *)(iVar6 + 300) & 0x80) != 0)) goto LAB_0086a63f;
cVar2 = CDirector::IsInTransition(TheDirector);
if (cVar2 == '\0') {
LAB_0086a689:
iVar6 = *(int *)(ZombieSurvivorRespawnHealth._28_4_ + 0x30);
if (iVar6 != *(int *)(this + 0x100)) {
(**(code **)(*(int *)this + 0x214))(this,this + 0x100);
*(int *)(this + 0x100) = iVar6;
}
}
else {
cVar2 = CDirector::IsTransitionScenarioRestart();
if (cVar2 == '\0') goto LAB_0086a689;
iVar6 = *(int *)(this + 0xfc);
if (iVar6 != *(int *)(this + 0x100)) {
(**(code **)(*(int *)this + 0x214))(this,this + 0x100);
*(int *)(this + 0x100) = iVar6;
}
}
ApplyHealthModifications(this);
LAB_0086a63f:
g_RespawningCheckpoint = (Checkpoint *)0x0;
iVar6 = CCSPlayer::GetActiveCSWeapon((CCSPlayer *)this);
if (iVar6 == 0) {
(**(code **)(*(int *)this + 0x808))(this);
}
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar6 == 2) {
cVar2 = CDirectorChallengeMode::HealingGnome(*(CDirectorChallengeMode **)(TheDirector + 0x648));
if (cVar2 != '\0') {
cVar4 = '\0';
iVar6 = (**(code **)(*(int *)this + 0x1fc))(this);
AddHealthBuffer(this,100.0,(float)iVar6);
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar2 = IsASurvivorTeam(iVar6);
if (cVar2 != '\0') {
cVar4 = IsOnThirdStrike(this);
}
if (*(int *)(this + 0x2e54) != 0) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x2e54) = 0;
}
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;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
this[0x2e58] = CVar3;
}
cVar2 = IsOnThirdStrike(this);
if (cVar2 != '\0') {
StopTrackedSound(this,"Player.Heartbeat");
CCSPlayer::EmitPrivateSound((CCSPlayer *)this,"Player.Heartbeat");
TrackSound(this,"Player.Heartbeat");
return;
}
if (cVar4 != '\0') {
StopTrackedSound(this,"Player.Heartbeat");
return;
}
}
}
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.