CBaseEntity::PhysicsPushEntity
0x0078e670 · 663 bytes · __thiscall
_ZN11CBaseEntity17PhysicsPushEntityERK6VectorP10CGameTrace
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseEntity::PhysicsPushEntity(Vector const&, CGameTrace*) */
void __thiscall
CBaseEntity::PhysicsPushEntity(CBaseEntity *this,Vector *param_1,CGameTrace *param_2)
{
uint uVar1;
int iVar2;
char cVar3;
int iVar4;
undefined4 uVar5;
undefined4 uVar6;
undefined *puVar7;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
int local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
local_3c = 0;
local_38 = 0;
if (___atan2f_finite == 0) {
local_2c = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_3c,0,0,0,0,"/data/src/game/server/physics_main.cpp",0x529,
&PhysicsPushEntity(Vector_const&,CGameTrace*)::tm_fmt,"(%s)%s","Unaccounted",
"CBaseEntity::PhysicsPushEntity");
local_2c = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_34 = local_3c;
local_30 = local_38;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 0078e876 to 0078e8c4 has its CatchHandler @ 0078e93f */
iVar4 = ThreadGetCurrentId();
if (iVar2 == iVar4) {
if ((char *)*_DAT_0105d15c != "CBaseEntity::PhysicsPushEntity") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb22fc,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
uVar1 = *(uint *)(this + 0x188);
if ((((uVar1 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) &&
(*(CBaseEntity **)(puVar7 + 4) != (CBaseEntity *)0x0)) {
/* try { // try from 0078e8f6 to 0078e918 has its CatchHandler @ 0078e91e */
uVar5 = GetDebugName(*(CBaseEntity **)(puVar7 + 4));
uVar6 = GetDebugName(this);
Warning("pushing entity (%s) that has parent (%s)!\n",uVar6,uVar5);
}
if (((byte)this[0x14d] & 8) != 0) {
/* try { // try from 0078e764 to 0078e7dc has its CatchHandler @ 0078e91e */
CalcAbsolutePosition(this);
}
local_28 = *(undefined4 *)(this + 0x2e0);
local_24 = *(undefined4 *)(this + 0x2e4);
local_20 = *(undefined4 *)(this + 0x2e8);
::PhysicsCheckSweep(this,(Vector *)&local_28,param_1,param_2);
if (*(float *)(param_2 + 0x2c) != 0.0) {
SetAbsOrigin(this,(Vector *)(param_2 + 0xc));
}
PhysicsTouchTriggers(this,(Vector *)&local_28);
if (*(CBaseEntity **)(param_2 + 0x4c) != (CBaseEntity *)0x0) {
PhysicsImpact(this,*(CBaseEntity **)(param_2 + 0x4c),param_2);
}
iVar2 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar4 = ThreadGetCurrentId();
if (iVar2 == iVar4) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_2c != 0) {
(**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,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.