CBaseDoor::DoorHitBottom
0x006695f0 · 803 bytes · __thiscall
_ZN9CBaseDoor13DoorHitBottomEv
Decompiled
undefined (1 param)
/* CBaseDoor::DoorHitBottom() */
void __thiscall CBaseDoor::DoorHitBottom(CBaseDoor *this)
{
float fVar1;
char cVar2;
uint uVar3;
int iVar4;
undefined *puVar5;
int *piVar6;
int local_98;
undefined1 local_94 [20];
undefined **local_80 [8];
undefined4 local_60;
undefined1 *local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined1 local_3c;
undefined1 local_3b;
undefined1 local_3a;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined2 local_20;
piVar6 = (int *)&stack0xffffff44;
cVar2 = (**(code **)(*(int *)this + 0x330))();
if ((cVar2 == '\0') &&
((*(char **)(this + 0x7c) == "func_door" ||
(cVar2 = CBaseEntity::ClassMatchesComplex((CBaseEntity *)this,"func_door"), cVar2 != '\0'))))
{
BlockNavArea(this,true);
}
uVar3 = *(uint *)(this + 0x148);
if ((uVar3 & 0x1000) == 0) {
(**(code **)(*(int *)this + 0x28c))();
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_80);
local_80[0] = &PTR__CPASFilter_00bfaf28;
/* try { // try from 006697b6 to 006697ba has its CatchHandler @ 00669962 */
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_80,(Vector *)&local_60);
local_80[0] = &PTR__CPASAttenuationFilter_00c08ec8;
/* try { // try from 006697cb to 006697e7 has its CatchHandler @ 00669938 */
(**(code **)(*(int *)this + 0x28c))();
piVar6 = (int *)&stack0xffffff3c;
CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_80,(Vector *)&local_60,0.8);
/* try { // try from 006697eb to 006697fa has its CatchHandler @ 00669951 */
CRecipientFilter::MakeReliable((CRecipientFilter *)local_80);
(**(code **)(*(int *)this + 0x334))();
local_20 = 0xffff;
local_5c = *(undefined1 **)(this + 0x514);
local_58 = 0x3f800000;
local_50 = 0;
local_4c = 100;
local_48 = 0;
local_44 = 0;
local_40 = 0;
local_3c = 1;
local_3b = 0;
local_3a = 0;
local_38 = 0xffffffff;
local_34 = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_60 = 6;
if (local_5c == (undefined1 *)0x0) {
local_5c = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x50c) != (undefined1 *)0x0) {
local_5c = *(undefined1 **)(this + 0x50c);
}
}
local_54 = 0x4b;
local_98 = 0;
if (*(int *)(this + 0x30) != 0) {
local_98 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
/* try { // try from 006698bf to 006698c3 has its CatchHandler @ 00669953 */
CBaseEntity::EmitSound((IRecipientFilter *)local_80,local_98,(EmitSound_t *)&local_60);
local_28 = 0;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
local_24 = local_34;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
local_80[0] = &PTR__CPASFilter_00bfaf28;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_80);
uVar3 = *(uint *)(this + 0x148);
}
*(undefined4 *)(this + 0x440) = 1;
*(code **)(this + 0xd8) = DoorTouch;
*(undefined4 *)(this + 0xdc) = 0;
if ((uVar3 & 1) == 0) {
uVar3 = *(uint *)(this + 0x494);
iVar4 = 0;
if (((uVar3 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar3 >> 0xc)) {
iVar4 = *(int *)(puVar5 + 4);
}
piVar6[3] = 0;
piVar6[2] = (int)this;
piVar6[1] = iVar4;
*piVar6 = (int)(this + 0x580);
piVar6[-1] = 0x669719;
COutputEvent::FireOutput
((COutputEvent *)*piVar6,(CBaseEntity *)piVar6[1],(CBaseEntity *)piVar6[2],
(float)piVar6[3]);
}
else {
uVar3 = *(uint *)(this + 0x494);
if (((uVar3 == 0xffffffff) ||
(puVar5 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar3 >> 0xc)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar5 + 4);
}
piVar6[1] = iVar4;
piVar6[3] = 0;
piVar6[2] = (int)this;
*piVar6 = (int)(this + 0x598);
piVar6[-1] = 0x6696c0;
COutputEvent::FireOutput
((COutputEvent *)*piVar6,(CBaseEntity *)piVar6[1],(CBaseEntity *)piVar6[2],
(float)piVar6[3]);
}
fVar1 = *(float *)(gpGlobals + 0xc);
piVar6[1] = (int)this;
piVar6[5] = (int)"CloseAreaportalThink";
piVar6[2] = (int)CloseAreaPortalsThink;
piVar6[4] = (int)(fVar1 + 0.5);
piVar6[3] = 0;
*piVar6 = (int)local_94;
piVar6[-1] = 0x66975b;
CBaseEntity::ThinkSet((_func_void *)*piVar6,(float)piVar6[1],(char *)piVar6[2]);
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.