CNavMesh::FireGameEvent
0x0073b630 · 1043 bytes · __thiscall
_ZN8CNavMesh13FireGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNavMesh::FireGameEvent(IGameEvent*) */
void __thiscall CNavMesh::FireGameEvent(CNavMesh *this,IGameEvent *param_1)
{
uint *puVar1;
CNavArea *this_00;
char cVar2;
char *pcVar3;
int iVar4;
int *piVar5;
int iVar6;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
int local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
CBaseEntity *local_20;
local_4c = 0;
local_48 = 0;
if (_towlower == 0) {
local_3c = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_4c,0,0,0,0,"/data/src/game/server/nav_mesh.cpp",0x172,
&FireGameEvent(IGameEvent*)::tm_fmt,"(%s)%s","NPCs","CNavMesh::FireGameEvent");
local_3c = _towlower;
}
iVar4 = _DAT_0105db00;
local_44 = local_4c;
local_40 = local_48;
/* try { // try from 0073b8ae to 0073b90e has its CatchHandler @ 0073ba5b */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar4 == iVar6)) {
if ((char *)*_DAT_0105d15c != "CNavMesh::FireGameEvent") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xca59b6,(char *)0x0,0xc8fa6a);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 0073b6ee to 0073b83f has its CatchHandler @ 0073ba70 */
pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
/* try { // try from 0073ba23 to 0073ba40 has its CatchHandler @ 0073ba70 */
if (((pcVar3 == "break_prop") || (iVar4 = _V_stricmp(pcVar3,"break_prop"), iVar4 == 0)) ||
((pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1), pcVar3 == "break_breakable" ||
(iVar4 = _V_stricmp(pcVar3,"break_breakable"), iVar4 == 0)))) {
iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entindex",0);
local_20 = (CBaseEntity *)UTIL_EntityByIndex(iVar4);
piVar5 = (int *)(**(code **)(*(int *)local_20 + 0x10))(local_20);
(**(code **)(*piVar5 + 0x3c))(piVar5,&local_38,&local_2c);
iVar4 = 0;
local_38 = local_38 - 10.0;
local_34 = local_34 - 10.0;
local_30 = local_30 - 10.0;
local_2c = local_2c + 10.0;
local_28 = local_28 + 10.0;
local_24 = local_24 + 10.0;
if (0 < DAT_00fe6000) {
do {
this_00 = *(CNavArea **)(TheNavAreas + iVar4 * 4);
cVar2 = CNavArea::IsOverlapping(this_00,(Extent *)&local_38);
if (cVar2 != '\0') {
/* try { // try from 0073b925 to 0073b9b8 has its CatchHandler @ 0073ba70 */
CNavArea::CheckFloor(this_00,local_20);
}
iVar4 = iVar4 + 1;
} while (iVar4 < DAT_00fe6000);
}
}
pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if ((pcVar3 == "round_start") || (iVar4 = _V_stricmp(pcVar3,"round_start"), iVar4 == 0)) {
(**(code **)(*(int *)this + 0x4c))(this);
if (0 < DAT_00fe6000) {
iVar4 = 0;
do {
piVar5 = *(int **)(TheNavAreas + iVar4 * 4);
(**(code **)(*piVar5 + 0xc))(piVar5);
iVar4 = iVar4 + 1;
} while (iVar4 < DAT_00fe6000);
}
iVar6 = 0;
iVar4 = _DAT_0105db00;
if (0 < *(int *)(this + 0x51c)) {
do {
CNavLadder::OnRoundRestart(*(CNavLadder **)(*(int *)(this + 0x510) + iVar6 * 4));
iVar6 = iVar6 + 1;
iVar4 = _DAT_0105db00;
} while (iVar6 < *(int *)(this + 0x51c));
}
}
else {
pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if (((pcVar3 == "round_start_pre_entity") ||
(iVar6 = _V_stricmp(pcVar3,"round_start_pre_entity"), iVar4 = _DAT_0105db00, iVar6 == 0)) &&
((**(code **)(*(int *)this + 0x50))(this), iVar4 = _DAT_0105db00, 0 < DAT_00fe6000)) {
iVar6 = 0;
do {
piVar5 = *(int **)(TheNavAreas + iVar6 * 4);
(**(code **)(*piVar5 + 0x10))(piVar5);
iVar6 = iVar6 + 1;
iVar4 = _DAT_0105db00;
} while (iVar6 < DAT_00fe6000);
}
}
_DAT_0105db00 = iVar4;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar4 == iVar6)) {
cVar2 = CVProfNode::ExitScope();
if (cVar2 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_3c != 0) {
(**(code **)(local_3c + 0x54))(local_3c,local_44,local_40,0,0,0);
}
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.