CBaseEntity::PerformPush
0x00792420 · 1392 bytes · __thiscall
_ZN11CBaseEntity11PerformPushEf
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseEntity::PerformPush(float) */
void __thiscall CBaseEntity::PerformPush(CBaseEntity *this,float param_1)
{
undefined4 uVar1;
float fVar2;
char cVar3;
int iVar4;
int *piVar5;
uint *puVar6;
int iVar7;
uint uVar8;
physicspushlist_t *ppVar9;
uint uVar10;
int *piVar11;
undefined *puVar12;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (___atan2f_finite == 0) {
local_20 = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_34,0,0,0,0,"/data/src/game/server/physics_main.cpp",0x5a0,
&PerformPush(float)::tm_fmt,"(%s)%s","Unaccounted","CBaseEntity::PerformPush");
local_20 = ___atan2f_finite;
}
iVar7 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 007924d1 to 007924d5 has its CatchHandler @ 007929c7 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar4 = ThreadGetCurrentId(), iVar7 == iVar4)) {
if ((char *)*_DAT_0105d15c != "CBaseEntity::PerformPush") {
/* try { // try from 00792888 to 00792899 has its CatchHandler @ 007929c7 */
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb2073,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
puVar12 = g_pPushedEntities;
uVar10 = *(uint *)(this + 700);
*(undefined4 *)(g_pPushedEntities + 0x24) = 0;
*(undefined4 *)(puVar12 + 0x10) = 0;
*(undefined4 *)(puVar12 + 0x34) = *(undefined4 *)(this + 0x39c);
*(undefined4 *)(puVar12 + 0x38) = *(undefined4 *)(this + 0x3a0);
*(undefined4 *)(puVar12 + 0x3c) = *(undefined4 *)(this + 0x3a4);
*(undefined4 *)(puVar12 + 0x40) = *(undefined4 *)(this + 0x3a8);
*(undefined4 *)(puVar12 + 0x44) = *(undefined4 *)(this + 0x3ac);
*(undefined4 *)(puVar12 + 0x48) = *(undefined4 *)(this + 0x3b0);
*(undefined4 *)(puVar12 + 0x4c) = *(undefined4 *)(this + 0x2d0);
if (param_1 <= 0.0) {
if (*(int *)(this + 0x238) != 0) goto LAB_00792690;
}
else {
if (((vec3_angle == *(float *)(this + 0x280)) && (DAT_01053d40 == *(float *)(this + 0x284))) &&
(DAT_01053d44 == *(float *)(this + 0x288))) {
/* try { // try from 00792730 to 0079283c has its CatchHandler @ 007929a6 */
piVar5 = (int *)PhysicsPushMove(this,param_1);
LAB_00792737:
if (piVar5 != (int *)0x0) goto LAB_007925b7;
uVar8 = 0xffffffff;
*(undefined4 *)(this + 700) = 0xffffffff;
if (uVar10 != 0xffffffff) goto LAB_007925d1;
LAB_00792760:
if (((uVar8 == 0xffffffff) ||
(piVar11 = (int *)(g_pEntityList + (uVar8 & 0xfff) * 0x10 + 4), piVar11 == (int *)0x0)) ||
(piVar11[1] != uVar8 >> 0xc)) goto LAB_00792620;
LAB_00792792:
if (*piVar11 == 0) goto LAB_00792620;
(**(code **)(*(int *)this + 0x1c0))(this,*piVar11);
piVar5 = *(int **)(this + 0x238);
}
else {
if (((vec3_origin == *(float *)(this + 0x2ec)) && (DAT_01053d4c == *(float *)(this + 0x2f0)))
&& (DAT_01053d50 == *(float *)(this + 0x2f4))) {
piVar5 = (int *)PhysicsPushRotate(this,param_1);
goto LAB_00792737;
}
uVar1 = *(undefined4 *)(this + 0x2d0);
/* try { // try from 007925a8 to 00792686 has its CatchHandler @ 007929a6 */
piVar5 = (int *)PhysicsPushRotate(this,param_1);
if (piVar5 == (int *)0x0) {
fVar2 = *(float *)(this + 0x2d0);
*(undefined4 *)(this + 0x2d0) = uVar1;
piVar5 = (int *)PhysicsPushMove(this,param_1);
if (*(float *)(this + 0x2d0) <= fVar2 && fVar2 != *(float *)(this + 0x2d0)) {
*(float *)(this + 0x2d0) = fVar2;
}
goto LAB_00792737;
}
LAB_007925b7:
puVar6 = (uint *)(**(code **)(*piVar5 + 0xc))(piVar5);
uVar8 = *puVar6;
*(uint *)(this + 700) = uVar8;
if (uVar10 == uVar8) goto LAB_00792760;
LAB_007925d1:
if (uVar10 != 0xffffffff) {
(**(code **)(*(int *)this + 0x1c4))(this);
uVar8 = *(uint *)(this + 700);
}
if (uVar8 != 0xffffffff) {
uVar10 = uVar8 & 0xfff;
piVar11 = (int *)(g_pEntityList + uVar10 * 0x10 + 4);
if (piVar11 == (int *)0x0) goto LAB_00792620;
if ((*(uint *)(g_pEntityList + uVar10 * 0x10 + 8) == uVar8 >> 0xc) &&
(*(int *)(g_pEntityList + uVar10 * 0x10 + 4) != 0)) {
/* try { // try from 00792944 to 00792984 has its CatchHandler @ 007929a6 */
(**(code **)(*(int *)this + 0x1bc))(this,piVar5);
uVar8 = *(uint *)(this + 700);
goto LAB_00792760;
}
if (*(uint *)(g_pEntityList + uVar10 * 0x10 + 8) != uVar8 >> 0xc) goto LAB_00792620;
goto LAB_00792792;
}
LAB_00792620:
piVar5 = *(int **)(this + 0x238);
}
if ((piVar5 != (int *)0x0) &&
((**(code **)(*piVar5 + 100))(piVar5), *(int *)(this + 0x238) != 0)) {
uVar10 = *(uint *)(this + 700);
/* try { // try from 007928cb to 007928e8 has its CatchHandler @ 007929a6 */
if ((((uVar10 == 0xffffffff) ||
((puVar12 = g_pEntityList + (uVar10 & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc
|| (*(uint *)(puVar12 + 8) != uVar10 >> 0xc)))) || (*(int *)(puVar12 + 4) == 0)) &&
(((iVar7 = (**(code **)(*(int *)(this + 0x194) + 0x2c))(this + 0x194), iVar7 == 6 &&
(0 < *(int *)(g_pPushedEntities + 0x24))) &&
(ppVar9 = (physicspushlist_t *)CreateDataObject(this,5),
ppVar9 != (physicspushlist_t *)0x0)))) {
CPhysicsPushedEntities::StoreMovedEntities
((CPhysicsPushedEntities *)g_pPushedEntities,ppVar9);
}
goto LAB_00792690;
}
}
fVar2 = *(float *)(this + 0x2d8);
if ((fVar2 < *(float *)(this + 0x2d0) || fVar2 == *(float *)(this + 0x2d0)) && (0.0 < fVar2)) {
SetMoveDoneTime(this,-1.0);
(**(code **)(*(int *)this + 0xe0))(this);
}
LAB_00792690:
iVar7 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar4 = ThreadGetCurrentId(), iVar7 == iVar4)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,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.