CPropDoorRotating::GetNPCOpenData
0x007e53a0 · 624 bytes · __thiscall
_ZN17CPropDoorRotating14GetNPCOpenDataEP11CAI_BaseNPCR10opendata_t
Decompiled
undefined (3 params)
/* CPropDoorRotating::GetNPCOpenData(CAI_BaseNPC*, opendata_t&) */
void __thiscall
CPropDoorRotating::GetNPCOpenData(CPropDoorRotating *this,CAI_BaseNPC *param_1,opendata_t *param_2)
{
float fVar1;
float fVar2;
float fVar3;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
AngleVectors((QAngle *)(this + 0x37c),(Vector *)&local_34,(Vector *)&local_28,(Vector *)0x0);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
fVar1 = *(float *)(this + 0x2e8);
fVar2 = *(float *)(this + 0x2e0);
*(float *)(param_2 + 4) = *(float *)(this + 0x2e4) - local_24 * 24.0;
*(float *)param_2 = fVar2 - local_28 * 24.0;
*(float *)(param_2 + 8) = (fVar1 - local_20 * 24.0) - 54.0;
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
}
fVar3 = *(float *)(param_1 + 0x2e4) * local_30;
fVar1 = *(float *)(param_1 + 0x2e0) * local_34;
fVar2 = *(float *)(param_1 + 0x2e8) * local_2c;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
if (fVar3 + fVar1 + fVar2 <=
*(float *)(this + 0x2e4) * local_30 + *(float *)(this + 0x2e0) * local_34 +
*(float *)(this + 0x2e8) * local_2c) {
*(float *)(param_2 + 0xc) = local_34;
*(float *)(param_2 + 0x10) = local_30;
*(float *)(param_2 + 0x14) = local_2c;
*(undefined4 *)(param_2 + 0x18) = 0x19a;
*(float *)param_2 = *(float *)param_2 - local_34 * 64.0;
*(float *)(param_2 + 4) = *(float *)(param_2 + 4) - local_30 * 64.0;
*(float *)(param_2 + 8) = *(float *)(param_2 + 8) - local_2c * 64.0;
return;
}
*(undefined4 *)(param_2 + 0x18) = 0x19a;
*(float *)param_2 = local_34 * 64.0 + *(float *)param_2;
*(float *)(param_2 + 4) = local_30 * 64.0 + *(float *)(param_2 + 4);
*(float *)(param_2 + 8) = local_2c * 64.0 + *(float *)(param_2 + 8);
*(float *)(param_2 + 0xc) = -local_34;
*(float *)(param_2 + 0x10) = -local_30;
*(float *)(param_2 + 0x14) = -local_2c;
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.