CPhysicsPushedEntities::GenerateBlockingEntityListAddBox
0x00791210 · 1036 bytes · __thiscall
_ZN22CPhysicsPushedEntities32GenerateBlockingEntityListAddBoxERK6Vector
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CPhysicsPushedEntities::GenerateBlockingEntityListAddBox(Vector const&) */
void __thiscall
CPhysicsPushedEntities::GenerateBlockingEntityListAddBox
(CPhysicsPushedEntities *this,Vector *param_1)
{
float fVar1;
IHandleEntity *pIVar2;
char cVar3;
uint uVar4;
int iVar5;
int iVar6;
int iVar7;
CPhysicsPushedEntities *pCVar8;
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",0x332,
&GenerateBlockingEntityListAddBox(Vector_const&)::tm_fmt,"(%s)%s","Unaccounted",
"CPhysicsPushedEntities::GenerateBlockingEntityListAddBox");
local_84 = ___atan2f_finite;
}
iVar7 = _DAT_0105db00;
local_8c = local_94;
local_88 = local_90;
/* try { // try from 00791566 to 007915b4 has its CatchHandler @ 00791686 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar7 == iVar6)) {
if ((char *)*_DAT_0105d15c != "CPhysicsPushedEntities::GenerateBlockingEntityListAddBox") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb23a4,(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 00791328 to 0079139f has its CatchHandler @ 0079162d */
local_60 = CBaseEntity::GetRootMoveParent((CBaseEntity *)**(undefined4 **)(this + 4));
local_20 = 0;
CPushBlockerEnum::s_nEnumCount = CPushBlockerEnum::s_nEnumCount + 1;
iVar7 = *(int *)(local_64 + 0x10) + -1;
iVar6 = iVar7 * 0x10;
pIVar2 = local_98;
pCVar8 = local_64;
do {
if (iVar7 < 0) {
iVar7 = *(int *)(this + 0x10) + -1;
iVar6 = iVar7 * 0x10;
local_98 = pIVar2;
for (; -1 < iVar7; iVar7 = iVar7 + -1) {
iVar5 = *(int *)(*(int *)(this + 4) + iVar6);
if ((*(char *)(iVar5 + 0x1b6) != '\0') && ((*(ushort *)(iVar5 + 0x1b4) & 0x24) == 0)) {
/* try { // try from 0079145d to 007914bc has its CatchHandler @ 00791666 */
CCollisionProperty::CollisionAABBToWorldAABB
((CCollisionProperty *)(iVar5 + 0x194),(Vector *)(iVar5 + 0x19c),
(Vector *)(iVar5 + 0x1a8),local_80,local_74);
iVar5 = 0;
do {
fVar1 = *(float *)(param_1 + iVar5 * 4);
if (fVar1 < 0.0) {
*(float *)(local_74 + iVar5 * 4) = *(float *)(local_74 + iVar5 * 4) - fVar1;
}
else {
*(float *)(local_80 + iVar5 * 4) = *(float *)(local_80 + iVar5 * 4) - fVar1;
}
iVar5 = iVar5 + 1;
} while (iVar5 != 3);
(**(code **)(*partition + 0x38))(partition,0x10,local_80,local_74,0,&local_68);
}
iVar6 = iVar6 + -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);
iVar7 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar7 == iVar6)) {
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 *)(pCVar8 + 4) + iVar6);
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);
iVar5 = *(int *)(*(int *)(*(int *)(local_64 + 4) + iVar6) + 0x234);
pCVar8 = local_64;
if ((int)local_20 < 1) {
LAB_007913cd:
pIVar2 = local_98;
if (local_20 < 8) {
local_40[local_20] = iVar5;
local_20 = local_20 + 1;
}
}
else {
pIVar2 = local_98;
if (iVar5 != local_40[0]) {
uVar4 = 0;
do {
uVar4 = uVar4 + 1;
if (uVar4 == local_20) goto LAB_007913cd;
} while (iVar5 != local_40[uVar4]);
}
}
}
local_98 = pIVar2;
iVar7 = iVar7 + -1;
iVar6 = iVar6 + -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.