SurvivorIntention::ShouldHurry
0x00949fb0 · 296 bytes · __thiscall
_ZNK17SurvivorIntention11ShouldHurryEPK8INextBot
Decompiled
undefined (2 params)
/* SurvivorIntention::ShouldHurry(INextBot const*) const */
int __thiscall SurvivorIntention::ShouldHurry(SurvivorIntention *this,INextBot *param_1)
{
char cVar1;
SurvivorBot *this_00;
SurvivorTeamSituation *this_01;
int iVar2;
int *piVar3;
int iVar4;
cVar1 = CDirector::IsFinale(TheDirector);
if (cVar1 == '\0') {
iVar2 = *(int *)(TheDirector + 0x1c0);
}
else {
cVar1 = CDirector::IsFinaleVehicleReady(TheDirector);
if (cVar1 != '\0') {
return 1;
}
iVar2 = *(int *)(TheDirector + 0x1c0);
}
if (((iVar2 < 1) && (*(int *)(*(int *)(TheDirector + 0x638) + 0x128) == 4)) &&
(cVar1 = CDirectorChallengeMode::ShouldHurry(*(CDirectorChallengeMode **)(TheDirector + 0x648))
, cVar1 == '\0')) {
this_00 = (SurvivorBot *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
this_01 = (SurvivorTeamSituation *)SurvivorBot::GetTeamSituation(this_00);
cVar1 = SurvivorTeamSituation::IsAnyTeammateNearCheckpoint(this_01);
if ((cVar1 == '\0') &&
(cVar1 = CTerrorPlayer::IsBeingHeroic((CTerrorPlayer *)this_00), cVar1 == '\0')) {
iVar2 = (**(code **)(*(int *)this + 8))(this);
while( true ) {
if (iVar2 == 0) {
return 2;
}
piVar3 = (int *)__dynamic_cast(iVar2,&INextBotEventResponder::typeinfo,
&IContextualQuery::typeinfo,0xfffffffe);
if ((piVar3 != (int *)0x0) &&
(iVar4 = (**(code **)(*piVar3 + 0xc))(piVar3,param_1), iVar4 != 2)) break;
iVar2 = (**(code **)(*(int *)this + 0xc))(this,iVar2);
}
return iVar4;
}
}
return 1;
}
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.