InfectedShamble::Update
0x00a35cb0 · 2102 bytes · __thiscall
_ZN15InfectedShamble6UpdateEP8Infectedf
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* InfectedShamble::Update(Infected*, float) */
InfectedShamble * __thiscall
InfectedShamble::Update(InfectedShamble *this,Infected *param_1,float param_2)
{
Infected *pIVar1;
float fVar2;
uint *puVar3;
float fVar4;
code *pcVar5;
char cVar6;
Infected IVar7;
int *piVar8;
int *piVar9;
CBaseEntity *this_00;
int iVar10;
int *piVar11;
int iVar12;
InfectedWander *this_01;
Vector *pVVar13;
float *pfVar14;
undefined4 *local_88;
int local_74;
int local_70;
int local_6c;
int local_68;
int local_64;
int local_60;
int local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
int local_40;
int local_3c;
int local_38;
undefined **local_34;
float local_30;
CBaseEntity *local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
pfVar14 = (float *)&stack0xffffff34;
local_74 = 0;
local_70 = 0;
if (_towlower == 0) {
local_5c = 0;
}
else {
(**(code **)(_towlower + 0x50))();
local_5c = _towlower;
}
iVar10 = _DAT_0105db00;
local_64 = local_74;
local_60 = local_70;
/* try { // try from 00a3607e to 00a360de has its CatchHandler @ 00a3655c */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar12 = ThreadGetCurrentId(), iVar10 == iVar12)) {
if ((char *)*_DAT_0105d15c != "InfectedShamble::Update") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd24500,(char *)0x0,0xca8906);
}
puVar3 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar3 = *puVar3 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 00a35d6b to 00a35ed0 has its CatchHandler @ 00a36549 */
piVar8 = (int *)(**(code **)(*(int *)param_2 + 0x590))();
piVar9 = (int *)(**(code **)(*(int *)param_2 + 0x594))();
if (*(int *)(param_1 + 0x34) == 0) {
/* try { // try from 00a36485 to 00a364af has its CatchHandler @ 00a36549 */
piVar11 = (int *)(**(code **)(*(int *)param_2 + 0x59c))();
iVar10 = (**(code **)(*piVar11 + 0xb4))();
*(int *)(param_1 + 0x34) = iVar10;
if (iVar10 == 0) {
this_01 = ::operator_new(0x74);
/* try { // try from 00a364bd to 00a364c1 has its CatchHandler @ 00a3651e */
InfectedWander::InfectedWander(this_01,(Action *)0x0);
*(undefined4 *)this = 1;
*(InfectedWander **)(this + 4) = this_01;
*(undefined4 *)(this + 8) = 0;
goto LAB_00a3600c;
}
}
fVar2 = (float)((int)param_2 + 0x1a3c);
local_34 = &PTR_operator___00d20e60;
local_30 = fVar2;
local_28 = (**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0xc0))();
this_00 = (CBaseEntity *)(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0xb4))();
iVar10 = (**(code **)(*(int *)this_00 + 0x14c))();
if (iVar10 == 0) {
local_24 = 0x3f800000;
}
else {
local_24 = *(undefined4 *)(iVar10 + 0x1cec);
}
cVar6 = (**(code **)(*(int *)this_00 + 0x16c))();
local_2c = (CBaseEntity *)0x0;
if (cVar6 != '\0') {
local_2c = this_00;
}
iVar10 = CBaseEntity::GetTeamNumber(this_00);
local_20 = 9;
if (iVar10 == 3) {
local_20 = (**(code **)(*(int *)this_00 + 0x544))();
}
fVar4 = *(float *)(param_1 + 0x34);
pIVar1 = param_1 + 0x38;
piVar11 = (int *)(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0xc0))();
cVar6 = (**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0x104))();
/* try { // try from 00a3610b to 00a363a2 has its CatchHandler @ 00a36549 */
if (((cVar6 == '\0') && (cVar6 = (**(code **)(*piVar11 + 0xd4))(), cVar6 == '\0')) &&
((cVar6 = (**(code **)(*(int *)(param_1 + 0x38) + 0x80))(), cVar6 == '\0' &&
(cVar6 = (**(code **)(*(int *)(param_1 + 0x38) + 0x80))(), cVar6 == '\0')))) {
(**(code **)(*(int *)(param_1 + 0x38) + 0x90))();
pfVar14 = (float *)&stack0xffffff30;
local_58 = local_4c;
local_54 = local_48;
local_50 = local_44;
pcVar5 = *(code **)(*piVar11 + 0x158);
(**(code **)(*piVar11 + 300))();
cVar6 = (*pcVar5)();
if (cVar6 == '\0') {
LAB_00a36510:
local_88 = &local_58;
pfVar14 = (float *)&stack0xffffff30;
goto LAB_00a35e59;
}
if (*(int *)(DirectChaseNavCheck._28_4_ + 0x30) != 0) {
/* try { // try from 00a364e5 to 00a36502 has its CatchHandler @ 00a36549 */
pVVar13 = (Vector *)(**(code **)(*piVar11 + 300))();
cVar6 = CNavMesh::DoesRayStayWithinMesh(TheNavMesh,pVVar13,(Vector *)&local_4c);
if (cVar6 == '\0') goto LAB_00a36510;
}
(**(code **)(*piVar11 + 0x120))();
(**(code **)(*piVar11 + 0xb4))();
piVar11 = (int *)(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 0xc4))();
(**(code **)(*piVar11 + 0xc4))();
(**(code **)(*(int *)(param_1 + 0x38) + 0x48))();
param_1[0x4844] = (Infected)0x1;
}
else {
local_88 = (undefined4 *)0x0;
pfVar14 = (float *)&stack0xffffff34;
LAB_00a35e59:
local_6c = 0;
local_68 = 0;
if (_towlower == 0) {
local_38 = 0;
}
else {
pfVar14[0xb] = (float)"ChasePath::Update";
pfVar14[10] = (float)"NextBot";
pfVar14[9] = (float)"(%s)%s";
pfVar14[8] = (float)&ChasePath::Update(INextBot*,CBaseEntity*,IPathCost_const&,Vector*)::
tm_fmt;
pfVar14[7] = 1.45735e-43;
pfVar14[6] = (float)"/data/src/game/server/nextbot/path/nextbotchasepath.h";
pfVar14[5] = 0.0;
pfVar14[3] = 0.0;
pfVar14[4] = 0.0;
pfVar14[2] = 0.0;
pfVar14[1] = (float)&local_6c;
*pfVar14 = (float)_towlower;
pcVar5 = *(code **)(_towlower + 0x50);
pfVar14[-1] = 1.50032e-38;
(*pcVar5)();
local_38 = _towlower;
}
iVar10 = _DAT_0105db00;
local_40 = local_6c;
local_3c = local_68;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 00a35f03 to 00a35f07 has its CatchHandler @ 00a3654d */
pfVar14[-1] = 1.5003277e-38;
iVar12 = ThreadGetCurrentId();
if (iVar10 == iVar12) {
if ((char *)*_DAT_0105d15c != "ChasePath::Update") {
pfVar14[4] = 5.60519e-45;
pfVar14[3] = (float)"NextBot";
pfVar14[2] = 0.0;
pfVar14[1] = (float)"ChasePath::Update";
*pfVar14 = (float)_DAT_0105d15c;
/* try { // try from 00a36450 to 00a36473 has its CatchHandler @ 00a3654d */
pfVar14[-1] = 1.5005178e-38;
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode
((char *)*pfVar14,(int)pfVar14[1],(char *)pfVar14[2],(int)pfVar14[3]
);
}
puVar3 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar3 = *puVar3 | 4;
*pfVar14 = (float)_DAT_0105d15c;
pfVar14[-1] = 1.5005222e-38;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
pfVar14[1] = fVar2;
*pfVar14 = (float)pIVar1;
pfVar14[4] = (float)local_88;
pfVar14[3] = (float)&local_34;
pfVar14[2] = fVar4;
/* try { // try from 00a35f33 to 00a35f43 has its CatchHandler @ 00a36560 */
pfVar14[-1] = 1.5003344e-38;
ChasePath::RefreshPath
((ChasePath *)*pfVar14,(INextBot *)pfVar14[1],(CBaseEntity *)pfVar14[2],
(IPathCost *)pfVar14[3],(Vector *)pfVar14[4]);
pfVar14[1] = fVar2;
*pfVar14 = (float)pIVar1;
pfVar14[-1] = 1.5003361e-38;
PathFollower::Update((PathFollower *)*pfVar14,(INextBot *)pfVar14[1]);
iVar10 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
pfVar14[-1] = 1.500341e-38;
iVar12 = ThreadGetCurrentId();
if (iVar10 == iVar12) {
*pfVar14 = (float)_DAT_0105d15c;
pfVar14[-1] = 1.5005055e-38;
cVar6 = CVProfNode::ExitScope();
if (cVar6 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_38 != 0) {
pfVar14[5] = 0.0;
pfVar14[4] = 0.0;
pfVar14[3] = 0.0;
*pfVar14 = (float)local_38;
pfVar14[1] = (float)local_40;
pfVar14[2] = (float)local_3c;
pcVar5 = *(code **)(local_38 + 0x54);
pfVar14[-1] = 1.5003498e-38;
(*pcVar5)();
}
iVar10 = *(int *)(param_1 + 0x38);
*pfVar14 = (float)pIVar1;
/* try { // try from 00a35faf to 00a35fec has its CatchHandler @ 00a36549 */
pcVar5 = *(code **)(iVar10 + 0x44);
pfVar14[-1] = 1.5003515e-38;
IVar7 = (Infected)(*pcVar5)();
param_1[0x4844] = IVar7;
}
pfVar14[1] = fVar2;
*pfVar14 = (float)pIVar1;
pfVar14[2] = fVar4;
pfVar14[-1] = 1.5003554e-38;
DirectChasePath::NotifyVictim
((DirectChasePath *)*pfVar14,(INextBot *)pfVar14[1],(CBaseEntity *)pfVar14[2]);
if (*(int *)(param_1 + 0x443c) < 1) {
iVar10 = *(int *)param_2;
*pfVar14 = param_2;
pcVar5 = *(code **)(iVar10 + 0x590);
pfVar14[-1] = 1.5004626e-38;
piVar8 = (int *)(*pcVar5)();
pcVar5 = *(code **)(*piVar8 + 0xb4);
iVar10 = *(int *)(param_1 + 0x34);
if ((*(byte *)(iVar10 + 0x14d) & 8) != 0) {
*pfVar14 = (float)iVar10;
pfVar14[-1] = 1.5004672e-38;
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)*pfVar14);
}
pfVar14[2] = 1.0;
pfVar14[1] = (float)(iVar10 + 0x2e0);
*pfVar14 = (float)piVar8;
pfVar14[-1] = 1.5004705e-38;
(*pcVar5)();
}
else {
iVar10 = *piVar8;
*pfVar14 = (float)piVar8;
pcVar5 = *(code **)(iVar10 + 200);
pfVar14[-1] = 1.5003598e-38;
cVar6 = (*pcVar5)();
if (cVar6 == '\0') {
iVar10 = *piVar8;
*pfVar14 = (float)piVar8;
pcVar5 = *(code **)(iVar10 + 0x114);
pfVar14[-1] = 1.5004742e-38;
cVar6 = (*pcVar5)();
if (cVar6 == '\0') {
iVar10 = *piVar8;
*pfVar14 = (float)piVar8;
pcVar5 = *(code **)(iVar10 + 0xf8);
pfVar14[-1] = 1.5004773e-38;
cVar6 = (*pcVar5)();
if (cVar6 != '\0') {
iVar10 = *piVar9;
pfVar14[1] = 8.28167e-43;
*pfVar14 = (float)piVar9;
pcVar5 = *(code **)(iVar10 + 0xe4);
pfVar14[-1] = 1.500482e-38;
cVar6 = (*pcVar5)();
if (cVar6 == '\0') {
iVar10 = *piVar9;
pfVar14[2] = 1.4013e-45;
pfVar14[1] = 8.28167e-43;
*pfVar14 = (float)piVar9;
pcVar5 = *(code **)(iVar10 + 0xd8);
pfVar14[-1] = 1.5004877e-38;
(*pcVar5)();
}
}
}
}
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
LAB_00a3600c:
iVar10 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
pfVar14[-1] = 1.5003682e-38;
iVar12 = ThreadGetCurrentId();
if (iVar10 == iVar12) {
*pfVar14 = (float)_DAT_0105d15c;
pfVar14[-1] = 1.5004965e-38;
cVar6 = CVProfNode::ExitScope();
if (cVar6 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_5c != 0) {
pfVar14[5] = 0.0;
pfVar14[4] = 0.0;
pfVar14[3] = 0.0;
*pfVar14 = (float)local_5c;
pfVar14[1] = (float)local_64;
pfVar14[2] = (float)local_60;
pcVar5 = *(code **)(local_5c + 0x54);
pfVar14[-1] = 1.5003764e-38;
(*pcVar5)();
}
return this;
}
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.