CDirectorChallengeMode::FindRescueAreaTrigger
0x00899060 · 258 bytes · __thiscall
_ZN22CDirectorChallengeMode21FindRescueAreaTriggerEv
Decompiled
undefined (1 param)
/* CDirectorChallengeMode::FindRescueAreaTrigger() */
CBaseEntity * __thiscall CDirectorChallengeMode::FindRescueAreaTrigger(CDirectorChallengeMode *this)
{
float fVar1;
int iVar2;
undefined1 *puVar3;
undefined4 *puVar4;
CBaseEntity *this_00;
float local_34;
float local_30;
float local_28;
float local_24;
iVar2 = *(int *)(TheNavMesh + 0x604);
if (iVar2 == 0) {
LAB_00899140:
this_00 = (CBaseEntity *)0x0;
}
else {
this_00 = (CBaseEntity *)0x0;
do {
while( true ) {
do {
this_00 = (CBaseEntity *)
CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)gEntList,this_00,"trigger_multiple");
if (this_00 == (CBaseEntity *)0x0) goto LAB_00899140;
(**(code **)(*(int *)(this_00 + 0x194) + 0x3c))(this_00 + 0x194,&local_34,&local_28);
fVar1 = *(float *)(iVar2 + 0x34);
} while ((((*(float *)(iVar2 + 0x2c) < local_34) || (local_28 < *(float *)(iVar2 + 0x2c)))
|| (*(float *)(iVar2 + 0x30) < local_30)) || (local_24 < *(float *)(iVar2 + 0x30)))
;
if (((byte)this_00[0x14d] & 8) != 0) break;
if (fVar1 < *(float *)(this_00 + 0x2e8) || fVar1 == *(float *)(this_00 + 0x2e8))
goto LAB_00899100;
}
CBaseEntity::CalcAbsolutePosition(this_00);
} while (*(float *)(this_00 + 0x2e8) <= fVar1 && fVar1 != *(float *)(this_00 + 0x2e8));
LAB_00899100:
puVar3 = &DAT_00d539c2;
if (*(undefined1 **)(this_00 + 0x154) != (undefined1 *)0x0) {
puVar3 = *(undefined1 **)(this_00 + 0x154);
}
Msg("Found rescue trigger \"%s\"\n",puVar3);
puVar4 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
*(undefined4 *)(this + 0x13c) = *puVar4;
}
return this_00;
}
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.