SurvivorBot::SaveFriendsInImmediateTrouble
0x0093df10 · 5080 bytes · __cdecl
_ZN11SurvivorBot29SaveFriendsInImmediateTroubleEP6ActionIS_E
Decompiled
undefined (1 param)
/* SurvivorBot::SaveFriendsInImmediateTrouble(Action<SurvivorBot>*) */
Action * SurvivorBot::SaveFriendsInImmediateTrouble(Action *param_1)
{
uint uVar1;
code *pcVar2;
bool bVar3;
char cVar4;
int iVar5;
SurvivorDislodgeVictim *pSVar6;
SurvivorLiberateBesiegedFriend *pSVar7;
undefined4 uVar8;
SurvivorReviveFriend *pSVar9;
uint uVar10;
uint uVar11;
Action *pAVar12;
undefined4 *puVar13;
undefined *puVar14;
CTerrorPlayer *pCVar15;
CBaseEntity *pCVar16;
int iVar17;
int *piVar18;
int in_GS_OFFSET;
longdouble lVar19;
float fVar20;
SurvivorBot *in_stack_00000008;
int in_stack_0000000c;
undefined8 uVar21;
undefined1 *puVar22;
undefined4 uVar23;
undefined4 uVar24;
float local_144;
CTerrorPlayer *local_140;
int local_134 [2];
CFmtStrN<256> local_12c [5];
undefined1 local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar5 = GetTeamSituation(in_stack_00000008);
cVar4 = IsAvailable(in_stack_00000008);
if (cVar4 == '\0') {
cVar4 = INextBot::IsDebugging((INextBot *)(in_stack_00000008 + 0x4028),1);
if (cVar4 != '\0') {
uVar8 = (**(code **)(*(int *)in_stack_00000008 + 0x9b8))();
DevMsg("%3.2f: %s: SaveFriendsInImmediateTrouble: Not available at the moment\n",
(double)*(float *)(gpGlobals + 0xc),uVar8);
}
}
else {
local_144 = *(float *)(SurvivorBotFriendImmobilizedReactionTimeNormal._28_4_ + 0x2c);
cVar4 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar4 == '\0') {
iVar17 = GetDifficulty();
if (iVar17 == 3) {
local_144 = *(float *)(SurvivorBotFriendImmobilizedReactionTimeExpert._28_4_ + 0x2c);
}
else {
iVar17 = GetDifficulty();
if (iVar17 == 2) {
local_144 = *(float *)(SurvivorBotFriendImmobilizedReactionTimeHard._28_4_ + 0x2c);
}
}
}
else {
local_144 = *(float *)(SurvivorBotFriendImmobilizedReactionTimeVS._28_4_ + 0x2c);
}
cVar4 = CTerrorPlayer::IsBeingHeroic((CTerrorPlayer *)in_stack_00000008);
if ((cVar4 != '\0') && (1.0 <= local_144)) {
local_144 = 1.0;
}
if (*(int *)(TheDirector + 0x1c0) < 1) {
uVar1 = *(uint *)(iVar5 + 0x10);
if (uVar1 == 0xffffffff) {
LAB_0093e7e5:
uVar10 = *(uint *)(iVar5 + 8);
if (uVar10 != 0xffffffff) {
uVar11 = uVar10 & 0xfff;
puVar13 = (undefined4 *)(g_pEntityList + uVar11 * 0x10 + 4);
if (((puVar13 != (undefined4 *)0x0) &&
(*(uint *)(g_pEntityList + uVar11 * 0x10 + 8) == uVar10 >> 0xc)) &&
(*(int *)(g_pEntityList + uVar11 * 0x10 + 4) != 0)) {
if (uVar1 != 0xffffffff) {
piVar18 = (int *)(g_pEntityList + (uVar1 & 0xfff) * 0x10 + 4);
if (piVar18 != (int *)0x0) {
if (piVar18[1] == uVar1 >> 0xc) goto LAB_0093ee1b;
goto LAB_0093f2fd;
}
goto LAB_0093f302;
}
LAB_0093f280:
if (puVar13[1] != uVar10 >> 0xc) goto LAB_0093f288;
pCVar15 = (CTerrorPlayer *)*puVar13;
goto LAB_0093ee25;
}
}
}
else {
uVar10 = uVar1 & 0xfff;
piVar18 = (int *)(g_pEntityList + uVar10 * 0x10 + 4);
if (((piVar18 == (int *)0x0) ||
(*(uint *)(g_pEntityList + uVar10 * 0x10 + 8) != uVar1 >> 0xc)) ||
(*(int *)(g_pEntityList + uVar10 * 0x10 + 4) == 0)) goto LAB_0093e7e5;
LAB_0093ee1b:
pCVar15 = (CTerrorPlayer *)*piVar18;
if (pCVar15 == (CTerrorPlayer *)0x0) {
uVar10 = *(uint *)(iVar5 + 8);
LAB_0093f2fd:
if (uVar10 == 0xffffffff) {
LAB_0093f288:
pCVar15 = (CTerrorPlayer *)0x0;
}
else {
LAB_0093f302:
puVar13 = (undefined4 *)(g_pEntityList + (uVar10 & 0xfff) * 0x10 + 4);
if (puVar13 != (undefined4 *)0x0) goto LAB_0093f280;
pCVar15 = (CTerrorPlayer *)0x0;
}
}
LAB_0093ee25:
cVar4 = CTerrorPlayer::HasWitchAttacker(pCVar15);
if (cVar4 != '\0') {
local_140 = (CTerrorPlayer *)0x0;
uVar1 = *(uint *)(iVar5 + 0x10);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)
) && (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
DescribeSubject((CBaseEntity *)local_140);
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar2 = *(code **)(*(int *)in_stack_00000008 + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_134,"SurvivorBotMovingToReviveFriend");
puVar22 = local_127;
uVar24 = 0;
uVar23 = 0;
uVar8 = 0;
uVar21 = CONCAT44(1,(CAI_Concept *)local_134);
(*pcVar2)();
uVar1 = *(uint *)(pCVar15 + 0x4020);
local_140 = (CTerrorPlayer *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)
) && (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
pAVar12 = ::operator_new(0x48);
*(undefined4 *)(pAVar12 + 0x20) = 0;
*(undefined4 *)(pAVar12 + 0x24) = 0;
*(undefined4 *)(pAVar12 + 0x28) = 0;
*(undefined4 *)(pAVar12 + 0xc) = 0;
*(undefined4 *)(pAVar12 + 0x10) = 0;
*(undefined4 *)(pAVar12 + 0x14) = 0;
*(undefined4 *)(pAVar12 + 0x18) = 0;
*(undefined4 *)(pAVar12 + 0x1c) = 0;
*(undefined4 *)(pAVar12 + 8) = 0;
pAVar12[0x30] = (Action)0x0;
pAVar12[0x31] = (Action)0x0;
*(undefined4 *)(pAVar12 + 0x2c) = 0;
*(undefined ***)pAVar12 = &PTR__SurvivorDispatchEnemy_00d01e28;
*(undefined ***)(pAVar12 + 4) = &PTR__SurvivorDispatchEnemy_00d01f8c;
*(undefined4 *)(pAVar12 + 0x34) = 0xffffffff;
*(undefined ***)(pAVar12 + 0x38) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(pAVar12 + 0x3c) = 0;
*(undefined4 *)(pAVar12 + 0x40) = 0xbf800000;
if (local_140 != (CTerrorPlayer *)0x0) {
/* try { // try from 0093efda to 0093efdc has its CatchHandler @ 0093f37c */
puVar13 = (undefined4 *)
(**(code **)(*(int *)local_140 + 0xc))
(local_140,uVar21,puVar22,uVar8,uVar23,uVar24);
*(undefined4 *)(pAVar12 + 0x34) = *puVar13;
}
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093f001 to 0093f005 has its CatchHandler @ 0093f356 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend(pSVar7,pCVar15,pAVar12);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Rescuing a downed friend from witch";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
goto LAB_0093df82;
}
}
}
uVar1 = *(uint *)(iVar5 + 0xd704);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar14 + 8) == uVar1 >> 0xc &&
((*(int *)(puVar14 + 4) != 0 &&
(cVar4 = (**(code **)(*(int *)(in_stack_00000008 + 0x4028) + 0xe0))
(in_stack_00000008 + 0x4028,*(int *)(puVar14 + 4)), cVar4 == '\0'))))))
{
iVar17 = 0;
uVar1 = *(uint *)(iVar5 + 0xd704);
if ((uVar1 != 0xffffffff) &&
((puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)))) {
iVar17 = *(int *)(puVar14 + 4);
}
if (*(float *)(iVar17 + 0x3ea0) <= 0.0) {
fVar20 = 99999.9;
}
else {
lVar19 = (longdouble)IntervalTimer::Now();
fVar20 = (float)lVar19 - *(float *)(iVar17 + 0x3ea0);
}
if (local_144 < fVar20) {
pCVar15 = (CTerrorPlayer *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd704);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar15 = *(CTerrorPlayer **)(puVar14 + 4);
}
cVar4 = IsReachable(in_stack_00000008,pCVar15);
if (cVar4 != '\0') {
pCVar16 = (CBaseEntity *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd704);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)
) && (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar16 = *(CBaseEntity **)(puVar14 + 4);
}
DescribeSubject(pCVar16);
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar2 = *(code **)(*(int *)in_stack_00000008 + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_134,"SurvivorBotMoveToSavePouncedFriend");
(*pcVar2)();
uVar1 = *(uint *)(iVar5 + 0xd704);
if (((uVar1 == 0xffffffff) ||
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 == (undefined *)0xfffffffc)
) || (*(uint *)(puVar14 + 8) != uVar1 >> 0xc)) {
local_140 = (CTerrorPlayer *)0x0;
}
else {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
pSVar6 = ::operator_new(0x6c);
/* try { // try from 0093e493 to 0093e497 has its CatchHandler @ 0093f3a2 */
SurvivorDislodgeVictim::SurvivorDislodgeVictim(pSVar6,(CBaseEntity *)local_140,true);
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093e4b7 to 0093e4bb has its CatchHandler @ 0093f3a0 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend
(pSVar7,local_140,(Action *)pSVar6);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Trying to dislodge Pounced friend!";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
goto LAB_0093df82;
}
}
}
uVar1 = *(uint *)(iVar5 + 0xd700);
if ((((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) &&
((*(int *)(puVar14 + 4) != 0 &&
(cVar4 = (**(code **)(*(int *)(in_stack_00000008 + 0x4028) + 0xe0))
(in_stack_00000008 + 0x4028,*(int *)(puVar14 + 4)), cVar4 == '\0')))) {
iVar17 = 0;
uVar1 = *(uint *)(iVar5 + 0xd700);
if ((uVar1 != 0xffffffff) &&
((puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)))) {
iVar17 = *(int *)(puVar14 + 4);
}
lVar19 = (longdouble)IntervalTimer::Now();
if (local_144 < (float)lVar19 - *(float *)(iVar17 + 0x33cc)) {
pCVar15 = (CTerrorPlayer *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd700);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar15 = *(CTerrorPlayer **)(puVar14 + 4);
}
cVar4 = IsReachable(in_stack_00000008,pCVar15);
if (cVar4 != '\0') {
pCVar16 = (CBaseEntity *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd700);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)
) && (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar16 = *(CBaseEntity **)(puVar14 + 4);
}
DescribeSubject(pCVar16);
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar2 = *(code **)(*(int *)in_stack_00000008 + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_134,"SurvivorBotMoveToSaveTonguedFriend");
pCVar15 = (CTerrorPlayer *)0x0;
(*pcVar2)();
uVar1 = *(uint *)(iVar5 + 0xd700);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)
) && (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar15 = *(CTerrorPlayer **)(puVar14 + 4);
}
if (pCVar15[0x39f1] == (CTerrorPlayer)0x0) {
pSVar6 = ::operator_new(0x6c);
/* try { // try from 0093ed81 to 0093ed85 has its CatchHandler @ 0093f354 */
SurvivorDislodgeVictim::SurvivorDislodgeVictim(pSVar6,(CBaseEntity *)pCVar15,true);
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093eda5 to 0093eda9 has its CatchHandler @ 0093f352 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend
(pSVar7,pCVar15,(Action *)pSVar6);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Trying to dislodge Smoker-tongued friend!";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
}
else {
pSVar9 = ::operator_new(0x74);
/* try { // try from 0093ea69 to 0093ea6d has its CatchHandler @ 0093f33a */
SurvivorReviveFriend::SurvivorReviveFriend(pSVar9,pCVar15);
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093ea8d to 0093ea91 has its CatchHandler @ 0093f338 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend
(pSVar7,pCVar15,(Action *)pSVar9);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Rescuing friend ledge-hanging from a Smoker Tongue!";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
}
goto LAB_0093df82;
}
}
}
uVar1 = *(uint *)(iVar5 + 0xd708);
if ((((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) &&
((*(int *)(puVar14 + 4) != 0 &&
(cVar4 = (**(code **)(*(int *)(in_stack_00000008 + 0x4028) + 0xe0))
(in_stack_00000008 + 0x4028,*(int *)(puVar14 + 4)), cVar4 == '\0')))) {
pCVar15 = (CTerrorPlayer *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd708);
if ((uVar1 != 0xffffffff) &&
((puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)))) {
pCVar15 = *(CTerrorPlayer **)(puVar14 + 4);
}
cVar4 = IsReachable(in_stack_00000008,pCVar15);
if (cVar4 != '\0') {
pCVar16 = (CBaseEntity *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd708);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar16 = *(CBaseEntity **)(puVar14 + 4);
}
DescribeSubject(pCVar16);
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar2 = *(code **)(*(int *)in_stack_00000008 + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_134,"SurvivorBotMoveToSavePummeledFriend");
puVar22 = local_127;
uVar24 = 0;
uVar23 = 0;
uVar8 = 0;
uVar21 = CONCAT44(1,(CAI_Concept *)local_134);
(*pcVar2)();
uVar1 = *(uint *)(iVar5 + 0xd708);
if (((uVar1 == 0xffffffff) ||
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar14 + 8) != uVar1 >> 0xc)) {
local_140 = (CTerrorPlayer *)0x0;
}
else {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
uVar1 = *(uint *)(local_140 + 0x3e48);
piVar18 = (int *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
piVar18 = *(int **)(puVar14 + 4);
}
pAVar12 = ::operator_new(0x48);
*(undefined4 *)(pAVar12 + 0x20) = 0;
*(undefined4 *)(pAVar12 + 0x24) = 0;
*(undefined4 *)(pAVar12 + 0x28) = 0;
*(undefined4 *)(pAVar12 + 0xc) = 0;
*(undefined4 *)(pAVar12 + 0x10) = 0;
*(undefined4 *)(pAVar12 + 0x14) = 0;
*(undefined4 *)(pAVar12 + 0x18) = 0;
*(undefined4 *)(pAVar12 + 0x1c) = 0;
*(undefined4 *)(pAVar12 + 8) = 0;
pAVar12[0x30] = (Action)0x0;
pAVar12[0x31] = (Action)0x0;
*(undefined4 *)(pAVar12 + 0x2c) = 0;
*(undefined ***)pAVar12 = &PTR__SurvivorDispatchEnemy_00d01e28;
*(undefined ***)(pAVar12 + 4) = &PTR__SurvivorDispatchEnemy_00d01f8c;
*(undefined4 *)(pAVar12 + 0x34) = 0xffffffff;
*(undefined ***)(pAVar12 + 0x38) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(pAVar12 + 0x3c) = 0;
*(undefined4 *)(pAVar12 + 0x40) = 0xbf800000;
if (piVar18 != (int *)0x0) {
/* try { // try from 0093ecf7 to 0093ecf9 has its CatchHandler @ 0093f362 */
puVar13 = (undefined4 *)
(**(code **)(*piVar18 + 0xc))(piVar18,uVar21,puVar22,uVar8,uVar23,uVar24);
*(undefined4 *)(pAVar12 + 0x34) = *puVar13;
}
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093ed1e to 0093ed22 has its CatchHandler @ 0093f326 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend(pSVar7,local_140,pAVar12);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Trying to dispatch Pummeler!";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
goto LAB_0093df82;
}
}
uVar1 = *(uint *)(iVar5 + 0xd70c);
if ((((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) &&
((*(int *)(puVar14 + 4) != 0 &&
(cVar4 = (**(code **)(*(int *)(in_stack_00000008 + 0x4028) + 0xe0))
(in_stack_00000008 + 0x4028,*(int *)(puVar14 + 4)), cVar4 == '\0')))) {
pCVar15 = (CTerrorPlayer *)0x0;
uVar1 = *(uint *)(iVar5 + 0xd70c);
if ((uVar1 != 0xffffffff) &&
((puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)))) {
pCVar15 = *(CTerrorPlayer **)(puVar14 + 4);
}
cVar4 = IsReachable(in_stack_00000008,pCVar15);
if (cVar4 != '\0') {
uVar1 = *(uint *)(iVar5 + 0xd70c);
if (((uVar1 == 0xffffffff) ||
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar14 + 8) != uVar1 >> 0xc)) {
local_140 = (CTerrorPlayer *)0x0;
}
else {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
pSVar6 = ::operator_new(0x6c);
/* try { // try from 0093e1ba to 0093e1be has its CatchHandler @ 0093f3a6 */
SurvivorDislodgeVictim::SurvivorDislodgeVictim(pSVar6,(CBaseEntity *)local_140,true);
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093e1de to 0093e1e2 has its CatchHandler @ 0093f3a4 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend
(pSVar7,local_140,(Action *)pSVar6);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Trying to dislodge Jockeyed friend!";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
goto LAB_0093df82;
}
}
uVar1 = *(uint *)(iVar5 + 8);
if (((uVar1 == 0xffffffff) ||
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar14 + 8) != uVar1 >> 0xc ||
((*(int *)(puVar14 + 4) == 0 || (cVar4 = CDirector::IsFinale(TheDirector), cVar4 == '\0'))))
)) {
bVar3 = true;
}
else {
local_134[0] = 0;
ForEachSurvivor<NumHumansInRescueVehicleScan>((NumHumansInRescueVehicleScan *)local_134);
bVar3 = local_134[0] < 1;
}
uVar1 = *(uint *)(iVar5 + 0x10);
if ((((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) &&
((*(CBaseEntity **)(puVar14 + 4) != (CBaseEntity *)0x0 && (*(int *)(TheDirector + 0x1c0) < 1)
))) {
DescribeSubject(*(CBaseEntity **)(puVar14 + 4));
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar2 = *(code **)(*(int *)in_stack_00000008 + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_134,"SurvivorBotMovingToReviveFriend");
(*pcVar2)();
uVar1 = *(uint *)(iVar5 + 0x10);
if ((uVar1 == 0xffffffff) ||
((puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 == (undefined *)0xfffffffc ||
(*(uint *)(puVar14 + 8) != uVar1 >> 0xc)))) {
local_140 = (CTerrorPlayer *)0x0;
}
else {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
pSVar9 = ::operator_new(0x74);
/* try { // try from 0093f1fe to 0093f202 has its CatchHandler @ 0093f3c2 */
SurvivorReviveFriend::SurvivorReviveFriend(pSVar9,local_140);
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093f222 to 0093f226 has its CatchHandler @ 0093f3b5 */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend
(pSVar7,local_140,(Action *)pSVar9);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Rescuing a downed human friend in big trouble";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
goto LAB_0093df82;
}
uVar1 = *(uint *)(iVar5 + 8);
if (((((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) && ((*(int *)(puVar14 + 4) != 0 && (bVar3)))) &&
(cVar4 = (**(code **)(*(int *)(in_stack_00000008 + 0x4028) + 0xe0))
(in_stack_00000008 + 0x4028,*(int *)(puVar14 + 4)), cVar4 == '\0')) {
if (150.0 < *(float *)(iVar5 + 0xc) || *(float *)(iVar5 + 0xc) == 150.0) {
uVar1 = *(uint *)(iVar5 + 8);
pCVar15 = (CTerrorPlayer *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar15 = *(CTerrorPlayer **)(puVar14 + 4);
}
lVar19 = (longdouble)CTerrorPlayer::GetTimeSinceAttackedByEnemy(pCVar15);
if ((float)lVar19 <= 1.5) goto LAB_0093df6e;
}
pCVar16 = (CBaseEntity *)0x0;
uVar1 = *(uint *)(iVar5 + 8);
if (((uVar1 != 0xffffffff) &&
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar14 + 8) == uVar1 >> 0xc)) {
pCVar16 = *(CBaseEntity **)(puVar14 + 4);
}
DescribeSubject(pCVar16);
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar2 = *(code **)(*(int *)in_stack_00000008 + 0x7b4);
CAI_Concept::CAI_Concept((CAI_Concept *)local_134,"SurvivorBotMovingToReviveFriend");
(*pcVar2)();
uVar1 = *(uint *)(iVar5 + 8);
if (((uVar1 == 0xffffffff) ||
(puVar14 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar14 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar14 + 8) != uVar1 >> 0xc)) {
local_140 = (CTerrorPlayer *)0x0;
}
else {
local_140 = *(CTerrorPlayer **)(puVar14 + 4);
}
pSVar9 = ::operator_new(0x74);
/* try { // try from 0093e74a to 0093e74e has its CatchHandler @ 0093f39e */
SurvivorReviveFriend::SurvivorReviveFriend(pSVar9,local_140);
pSVar7 = ::operator_new(0x4c);
/* try { // try from 0093e76e to 0093e772 has its CatchHandler @ 0093f38c */
SurvivorLiberateBesiegedFriend::SurvivorLiberateBesiegedFriend
(pSVar7,local_140,(Action *)pSVar9);
*(undefined4 *)param_1 = 2;
*(SurvivorLiberateBesiegedFriend **)(param_1 + 4) = pSVar7;
*(char **)(param_1 + 8) = "Rescuing a downed friend in big trouble";
*(undefined4 *)(in_stack_0000000c + 0x20) = 0;
*(undefined4 *)(in_stack_0000000c + 0x24) = 0;
*(undefined4 *)(in_stack_0000000c + 0x28) = 0;
*(undefined4 *)(in_stack_0000000c + 0x2c) = 0;
goto LAB_0093df82;
}
}
LAB_0093df6e:
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
LAB_0093df82:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_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.