CPhysicsPushedEntities::GenerateBlockingEntityList
0x00790dd0 · 957 bytes · __thiscall
_ZN22CPhysicsPushedEntities26GenerateBlockingEntityListEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CPhysicsPushedEntities::GenerateBlockingEntityList() */
void __thiscall CPhysicsPushedEntities::GenerateBlockingEntityList(CPhysicsPushedEntities *this)
{
int iVar1;
IHandleEntity *pIVar2;
char cVar3;
uint uVar4;
int iVar5;
int iVar6;
CPhysicsPushedEntities *pCVar7;
IHandleEntity *local_98;
undefined4 local_94;
undefined4 local_90;
undefined4 local_8c;
undefined4 local_88;
int local_84;
Vector local_80 [12];
Vector local_74 [12];
undefined **local_68;
CPhysicsPushedEntities *local_64;
undefined4 local_60;
undefined **local_5c;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
int local_48;
undefined4 local_44;
int local_40 [8];
uint local_20;
local_94 = 0;
local_90 = 0;
if (___atan2f_finite == 0) {
local_84 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_94,0,0,0,0,"/data/src/game/server/physics_main.cpp",0x316,
&GenerateBlockingEntityList()::tm_fmt,"(%s)%s","Unaccounted",
"CPhysicsPushedEntities::GenerateBlockingEntityList");
local_84 = ___atan2f_finite;
}
iVar6 = _DAT_0105db00;
local_8c = local_94;
local_88 = local_90;
/* try { // try from 007910f6 to 00791144 has its CatchHandler @ 007911fe */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar5 = ThreadGetCurrentId(), iVar6 == iVar5)) {
if ((char *)*_DAT_0105d15c != "CPhysicsPushedEntities::GenerateBlockingEntityList") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb2370,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
local_68 = &PTR_EnumElement_00cb25b0;
local_5c = &PTR_ShouldHitEntity_00cb25a0;
local_54 = 0;
local_50 = 0;
*(undefined4 *)(this + 0x24) = 0;
local_64 = this;
local_4c = 0;
local_48 = 0;
local_44 = 0;
/* try { // try from 00790ee8 to 00790f5f has its CatchHandler @ 007911a5 */
local_60 = CBaseEntity::GetRootMoveParent((CBaseEntity *)**(undefined4 **)(this + 4));
local_20 = 0;
CPushBlockerEnum::s_nEnumCount = CPushBlockerEnum::s_nEnumCount + 1;
iVar6 = *(int *)(local_64 + 0x10) + -1;
iVar5 = iVar6 * 0x10;
pIVar2 = local_98;
pCVar7 = local_64;
do {
if (iVar6 < 0) {
iVar6 = *(int *)(this + 0x10) + -1;
iVar5 = iVar6 * 0x10;
local_98 = pIVar2;
for (; -1 < iVar6; iVar6 = iVar6 + -1) {
iVar1 = *(int *)(*(int *)(this + 4) + iVar5);
if ((*(char *)(iVar1 + 0x1b6) != '\0') && ((*(ushort *)(iVar1 + 0x1b4) & 0x24) == 0)) {
/* try { // try from 00791015 to 00791048 has its CatchHandler @ 007911de */
CCollisionProperty::CollisionAABBToWorldAABB
((CCollisionProperty *)(iVar1 + 0x194),(Vector *)(iVar1 + 0x19c),
(Vector *)(iVar1 + 0x1a8),local_80,local_74);
(**(code **)(*partition + 0x38))(partition,0x10,local_80,local_74,0,&local_68);
}
iVar5 = iVar5 + -0x10;
}
local_68 = &PTR_EnumElement_00cb25b0;
local_5c = &PTR_ShouldHitEntity_00cb25a0;
local_48 = 0;
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)&local_54);
local_44 = local_54;
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)&local_54);
iVar6 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar5 = ThreadGetCurrentId(), iVar6 == iVar5)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_84 != 0) {
(**(code **)(local_84 + 0x54))(local_84,local_8c,local_88,0,0,0);
}
return;
}
local_98 = *(IHandleEntity **)(*(int *)(pCVar7 + 4) + iVar5);
if ((local_98[0x1b6] != (IHandleEntity)0x0) && ((*(ushort *)(local_98 + 0x1b4) & 4) == 0)) {
CUtlVector<IHandleEntity*,CUtlMemory<IHandleEntity*,int>>::InsertBefore
((CUtlVector<IHandleEntity*,CUtlMemory<IHandleEntity*,int>> *)&local_54,local_48,
&local_98);
iVar1 = *(int *)(*(int *)(*(int *)(local_64 + 4) + iVar5) + 0x234);
pCVar7 = local_64;
if ((int)local_20 < 1) {
LAB_00790f8d:
pIVar2 = local_98;
if (local_20 < 8) {
local_40[local_20] = iVar1;
local_20 = local_20 + 1;
}
}
else {
pIVar2 = local_98;
if (iVar1 != local_40[0]) {
uVar4 = 0;
do {
uVar4 = uVar4 + 1;
if (uVar4 == local_20) goto LAB_00790f8d;
} while (iVar1 != local_40[uVar4]);
}
}
}
local_98 = pIVar2;
iVar6 = iVar6 + -1;
iVar5 = iVar5 + -0x10;
pIVar2 = local_98;
} while( true );
}
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.