SurvivorBot::Spawn
0x00943c80 · 1774 bytes · __thiscall
_ZN11SurvivorBot5SpawnEv
Decompiled
undefined (1 param)
/* SurvivorBot::Spawn() */
void __thiscall SurvivorBot::Spawn(SurvivorBot *this)
{
char cVar1;
undefined4 *puVar2;
SurvivorBot *pSVar3;
int iVar4;
longdouble lVar5;
(**(code **)(*engine + 0x15c))(engine,*(undefined4 *)(this + 0x30),"cl_autohelp",&DAT_00c09604);
*(undefined4 *)(this + 0x425c) = 0;
*(undefined4 *)(this + 0x4260) = 0;
if (*(float *)(this + 0x426c) != -1.0) {
(**(code **)(*(int *)(this + 0x4264) + 4))(this + 0x4264,this + 0x426c);
*(undefined4 *)(this + 0x426c) = 0xbf800000;
}
if (*(float *)(this + 0x4278) != -1.0) {
(**(code **)(*(int *)(this + 0x4270) + 4))(this + 0x4270,this + 0x4278);
*(undefined4 *)(this + 0x4278) = 0xbf800000;
}
if (*(float *)(this + 0x4284) != -1.0) {
(**(code **)(*(int *)(this + 0x427c) + 4))(this + 0x427c,this + 0x4284);
*(undefined4 *)(this + 0x4284) = 0xbf800000;
}
if (*(float *)(this + 0x4290) != -1.0) {
(**(code **)(*(int *)(this + 0x4288) + 4))(this + 0x4288,this + 0x4290);
*(undefined4 *)(this + 0x4290) = 0xbf800000;
}
if (*(float *)(this + 0x429c) != -1.0) {
(**(code **)(*(int *)(this + 0x4294) + 4))(this + 0x4294,this + 0x429c);
*(undefined4 *)(this + 0x429c) = 0xbf800000;
}
if (*(float *)(this + 0x42a8) != -1.0) {
(**(code **)(*(int *)(this + 0x42a0) + 4))(this + 0x42a0,this + 0x42a8);
*(undefined4 *)(this + 0x42a8) = 0xbf800000;
}
if (*(float *)(this + 0x42b4) != -1.0) {
(**(code **)(*(int *)(this + 0x42ac) + 4))(this + 0x42ac,this + 0x42b4);
*(undefined4 *)(this + 0x42b4) = 0xbf800000;
}
if (*(float *)(this + 0x42c0) != -1.0) {
(**(code **)(*(int *)(this + 0x42b8) + 4))(this + 0x42b8,this + 0x42c0);
*(undefined4 *)(this + 0x42c0) = 0xbf800000;
}
if (*(float *)(this + 0x42cc) != -1.0) {
(**(code **)(*(int *)(this + 0x42c4) + 4))(this + 0x42c4,this + 0x42cc);
*(undefined4 *)(this + 0x42cc) = 0xbf800000;
}
if (*(float *)(this + 0x42d8) != -1.0) {
(**(code **)(*(int *)(this + 0x42d0) + 4))(this + 0x42d0,this + 0x42d8);
*(undefined4 *)(this + 0x42d8) = 0xbf800000;
}
if (*(float *)(this + 0x42e4) != -1.0) {
(**(code **)(*(int *)(this + 0x42dc) + 4))(this + 0x42dc,this + 0x42e4);
*(undefined4 *)(this + 0x42e4) = 0xbf800000;
}
if (*(float *)(this + 0x42f0) != -1.0) {
(**(code **)(*(int *)(this + 0x42e8) + 4))(this + 0x42e8,this + 0x42f0);
*(undefined4 *)(this + 0x42f0) = 0xbf800000;
}
*(undefined4 *)(this + 0x4300) = 0x3d23d70a;
*(undefined4 *)(this + 0x42fc) = 0x3d23d70a;
if (*(float *)(this + 0x42f8) != -1.0) {
(**(code **)(*(int *)(this + 0x42f4) + 4))(this + 0x42f4,this + 0x42f8);
*(undefined4 *)(this + 0x42f8) = 0xbf800000;
}
INextBot::Reset((INextBot *)(this + 0x4028));
CTerrorPlayer::Spawn((CTerrorPlayer *)this);
*(undefined4 *)(this + 0x8b68) = 0;
*(undefined4 *)(this + 0x8b3c) = 0;
*(undefined4 *)(this + 0x8b40) = 0;
*(undefined4 *)(this + 0x8b44) = 0;
PathFollower::Invalidate((PathFollower *)(this + 0x16298));
*(undefined4 *)(this + 0x1aa90) = 0;
if (*(float *)(this + 0x8b50) != -1.0) {
(**(code **)(*(int *)(this + 0x8b48) + 4))(this + 0x8b48,this + 0x8b50);
*(undefined4 *)(this + 0x8b50) = 0xbf800000;
}
if (*(float *)(this + 0x8b58) != -1.0) {
(**(code **)(*(int *)(this + 0x8b54) + 4))(this + 0x8b54,this + 0x8b58);
*(undefined4 *)(this + 0x8b58) = 0xbf800000;
}
if (*(float *)(this + 0x8b64) != -1.0) {
(**(code **)(*(int *)(this + 0x8b5c) + 4))(this + 0x8b5c,this + 0x8b64);
*(undefined4 *)(this + 0x8b64) = 0xbf800000;
}
SurvivorTeamSituation::Reset((SurvivorTeamSituation *)(this + 0x8b6c));
*(undefined4 *)(this + 0x1aa98) = 0;
*(undefined4 *)(this + 0x1aa9c) = 0;
this[0x1aaa0] = (SurvivorBot)0x0;
this[0x1aaa1] = (SurvivorBot)0x0;
this[0x1aaa2] = (SurvivorBot)0x0;
*(undefined4 *)(this + 0x1aaa4) = 0;
if (*(float *)(this + 0x1aab4) != -1.0) {
(**(code **)(*(int *)(this + 0x1aaac) + 4))(this + 0x1aaac,this + 0x1aab4);
*(undefined4 *)(this + 0x1aab4) = 0xbf800000;
}
*(undefined4 *)(this + 0x1aaa8) = 0;
puVar2 = &DAT_010108cc;
*(undefined4 *)(this + 0x1aab8) = 0xffffffff;
do {
*puVar2 = 0xbf800000;
puVar2 = puVar2 + 4;
} while (puVar2 != (undefined4 *)(SurvivorBotReachabilityCacheLifetime + 0xc));
*(undefined4 *)(this + 0x1aafc) = 0;
*(undefined4 *)(this + 0x1ab00) = 0;
cVar1 = CTerrorPlayer::WasSpawnedAtCheckpoint((CTerrorPlayer *)this);
if (cVar1 == '\0') {
lVar5 = (longdouble)RandomFloat(0x3f800000,0x40000000);
Say(this,"SurvivorBotRescued",2,(float)lVar5,0);
}
iVar4 = 8;
pSVar3 = this + 0x1ab10;
do {
while (*(float *)(this + (int)(pSVar3 + (8 - (int)this))) != -1.0) {
(**(code **)(*(int *)pSVar3 + 4))(pSVar3,pSVar3 + 8);
iVar4 = iVar4 + -1;
*(undefined4 *)(this + (int)(pSVar3 + (8 - (int)this))) = 0xbf800000;
pSVar3 = pSVar3 + 0xc;
if (iVar4 == 0) goto LAB_00943f57;
}
pSVar3 = pSVar3 + 0xc;
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
LAB_00943f57:
*(undefined4 *)(this + 0x1aba0) = 0xffffffff;
if (*(float *)(this + 0x1aba8) != -1.0) {
(**(code **)(*(int *)(this + 0x1aba4) + 4))(this + 0x1aba4,this + 0x1aba8);
*(undefined4 *)(this + 0x1aba8) = 0xbf800000;
}
this[0x1abb4] = (SurvivorBot)0x0;
if (*(float *)(this + 0x1abb0) != -1.0) {
(**(code **)(*(int *)(this + 0x1abac) + 4))(this + 0x1abac,this + 0x1abb0);
*(undefined4 *)(this + 0x1abb0) = 0xbf800000;
}
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.