CTerrorPlayer::OnMissionLost
0x009c6230 · 346 bytes · __thiscall
_ZN13CTerrorPlayer13OnMissionLostEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::OnMissionLost() */
void __thiscall CTerrorPlayer::OnMissionLost(CTerrorPlayer *this)
{
int *piVar1;
char cVar2;
int iVar3;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
int *local_20;
undefined4 local_1c;
undefined4 local_18;
int local_14;
int *local_10;
(**(code **)(*(int *)(this + 0x3ab4) + 0x58))(this + 0x3ab4);
this[0x3e41] = (CTerrorPlayer)0x0;
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar3 != 3) {
return;
}
iVar3 = (**(code **)(*(int *)this + 0x544))(this);
if (iVar3 != 8) {
return;
}
cVar2 = (**(code **)(*(int *)this + 300))(this);
piVar1 = mdlcache;
if (cVar2 == '\0') {
return;
}
if (((byte)this[0x150] & 1) != 0) {
(**(code **)(*mdlcache + 0x68))(mdlcache);
local_20 = (int *)0x0;
local_1c = 0;
local_18 = 0;
local_14 = 0;
local_10 = (int *)0x0;
local_30 = 3;
local_2c = 2;
local_28 = 3;
local_24 = 8;
/* try { // try from 009c62eb to 009c6345 has its CatchHandler @ 009c6395 */
ForEachTerrorPlayer<PlayerCollector>((PlayerCollector *)&local_30);
if ((local_14 < 2) ||
((iVar3 = CMultiPlayerAnimState::GetMainActivity
(*(CMultiPlayerAnimState **)(*local_20 + 0x2910)), iVar3 != 0x318 &&
(iVar3 = CMultiPlayerAnimState::GetMainActivity
(*(CMultiPlayerAnimState **)(local_20[1] + 0x2910)), iVar3 != 0x318)))) {
(**(code **)(*(int *)this + 0x7fc))(this,0x5f,2);
}
else {
/* try { // try from 009c638d to 009c6392 has its CatchHandler @ 009c6395 */
(**(code **)(*(int *)this + 0x7fc))(this,0x5f,3);
}
local_14 = 0;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_20);
local_10 = local_20;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_20);
(**(code **)(*piVar1 + 0x6c))(piVar1);
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.