CPropDoorRotating::CheckDoorClear
0x007fb540 · 1279 bytes · __thiscall
_ZN17CPropDoorRotating14CheckDoorClearE11doorCheck_e
Decompiled
undefined (2 params)
/* CPropDoorRotating::CheckDoorClear(doorCheck_e) */
undefined4 __thiscall CPropDoorRotating::CheckDoorClear(CPropDoorRotating *this,int param_2)
{
CPropDoorRotating CVar1;
Vector *pVVar2;
Vector *pVVar3;
float local_104;
float local_100;
float local_fc;
float local_f8;
float local_f4;
float local_f0;
undefined **local_ec;
undefined4 local_e8;
undefined4 local_e4;
undefined4 local_e0;
undefined4 local_dc;
undefined4 local_d8;
CPropDoorRotating *local_d4;
undefined4 local_d0;
float local_cc;
float local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
float local_ac;
float local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
undefined1 local_70 [54];
char local_3a;
char local_39;
CBaseEntity *local_24;
if (param_2 == 0) {
local_104 = *(float *)(this + 0x1798);
local_100 = *(float *)(this + 0x179c);
local_fc = *(float *)(this + 0x17a0);
local_f8 = *(float *)(this + 0x17a4);
local_f4 = *(float *)(this + 0x17a8);
local_f0 = *(float *)(this + 0x17ac);
}
else {
if (param_2 == 1) {
local_104 = *(float *)(this + 0x17b0);
CVar1 = this[0x14d];
local_100 = *(float *)(this + 0x17b4);
local_fc = *(float *)(this + 0x17b8);
local_f8 = *(float *)(this + 0x17bc);
local_f4 = *(float *)(this + 0x17c0);
local_f0 = *(float *)(this + 0x17c4);
goto joined_r0x007fb8ad;
}
UTIL_ComputeAABBForBounds
((Vector *)(this + 0x1798),(Vector *)(this + 0x17a4),(Vector *)(this + 0x17b0),
(Vector *)(this + 0x17bc),(Vector *)&local_104,(Vector *)&local_f8);
}
CVar1 = this[0x14d];
joined_r0x007fb8ad:
if ((((byte)CVar1 & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_87 = 0;
local_bc = 0;
local_b8 = 0;
local_b4 = 0;
local_8c = 0;
local_ec = &PTR_ShouldHitEntity_00cc4f38;
local_e8 = 0;
local_9c = (local_f8 - local_104) * 0.5;
local_e4 = 0;
local_98 = (local_f4 - local_100) * 0.5;
local_94 = (local_f0 - local_fc) * 0.5;
pVVar2 = (Vector *)(this + 0x2e0);
local_ac = (local_f8 + local_104) * 0.5;
local_a8 = (local_f4 + local_100) * 0.5;
local_c4 = (local_f0 + local_fc) * 0.5;
local_c8 = *(float *)(this + 0x2e4) + local_a8;
local_a8 = -local_a8;
local_cc = *(float *)pVVar2 + local_ac;
local_ac = -local_ac;
local_a4 = -local_c4;
local_c4 = *(float *)(this + 0x2e8) + local_c4;
local_88 = local_9c * local_9c + local_98 * local_98 + local_94 * local_94 < 1e-06;
local_e0 = 0;
local_dc = 0;
local_d8 = 0;
local_d4 = this;
local_d0 = 0x200;
/* try { // try from 007fb779 to 007fb77b has its CatchHandler @ 007fba55 */
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x200420b,&local_ec,local_70);
local_ec = &PTR_ShouldHitEntity_00cc4f38;
local_dc = 0;
CUtlMemory<IHandleEntity_const*,int>::Purge((CUtlMemory<IHandleEntity_const*,int> *)&local_e8);
local_d8 = local_e8;
CUtlMemory<IHandleEntity_const*,int>::Purge((CUtlMemory<IHandleEntity_const*,int> *)&local_e8);
if ((local_3a == '\0') && (local_39 == '\0')) {
if (*(int *)(g_debug_doors._28_4_ + 0x30) != 0) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
NDebugOverlay::Box(pVVar2,(Vector *)&local_104,(Vector *)&local_f8,0,0xff,0,1,10.0);
}
return 1;
}
if (*(int *)(g_debug_doors._28_4_ + 0x30) != 0) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
NDebugOverlay::Box(pVVar2,(Vector *)&local_104,(Vector *)&local_f8,0xff,0,0,1,10.0);
if (local_24 != (CBaseEntity *)0x0) {
pVVar2 = (Vector *)(**(code **)(*(int *)(local_24 + 0x194) + 8))(local_24 + 0x194);
pVVar3 = (Vector *)(**(code **)(*(int *)(local_24 + 0x194) + 4))(local_24 + 0x194);
if (((byte)local_24[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(local_24);
}
NDebugOverlay::Box((Vector *)(local_24 + 0x2e0),pVVar3,pVVar2,0xdc,0xdc,0,1,10.0);
}
}
return 0;
}
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.