CBaseServerVehicle::CheckExitPoint
0x00b37140 · 923 bytes · __thiscall
_ZN18CBaseServerVehicle14CheckExitPointEfiP6Vector
Decompiled
undefined (4 params)
/* CBaseServerVehicle::CheckExitPoint(float, int, Vector*) */
bool __thiscall
CBaseServerVehicle::CheckExitPoint
(CBaseServerVehicle *this,float param_1,int param_2,Vector *param_3)
{
float fVar1;
float fVar2;
CBaseEntity *this_00;
IHandleEntity *pIVar3;
int *piVar4;
int iVar5;
int iVar6;
float fVar7;
float fVar8;
undefined4 local_f4;
float local_f0;
undefined4 local_ec;
float local_e8;
float local_e4;
float local_e0;
CTraceFilterSimple local_dc [16];
float local_cc;
float local_c8;
float local_c4;
float local_bc;
float local_b8;
float 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;
Vector local_70 [12];
Vector local_64 [32];
float local_44;
this_00 = *(CBaseEntity **)(this + 0x2c);
local_f4 = *(undefined4 *)(this_00 + 0x3a8);
local_f0 = *(float *)(this_00 + 0x3ac);
local_ec = *(undefined4 *)(this_00 + 0x3b0);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
fVar7 = *(float *)(this_00 + 0x2e8) + 12.0;
local_f0 = param_1 + local_f0;
fVar1 = *(float *)(this_00 + 0x2e0);
fVar2 = *(float *)(this_00 + 0x2e4);
AngleVectors((QAngle *)&local_f4,(Vector *)0x0,(Vector *)&local_e8,(Vector *)0x0);
fVar8 = (float)param_2;
local_e8 = -local_e8;
local_e4 = -local_e4;
local_e0 = -local_e0;
*(float *)param_3 = local_e8 * fVar8 + fVar1;
piVar4 = g_pGameRules;
*(float *)(param_3 + 4) = local_e4 * fVar8 + fVar2;
*(float *)(param_3 + 8) = local_e0 * fVar8 + fVar7;
pIVar3 = *(IHandleEntity **)(this + 0x2c);
iVar5 = (**(code **)(*piVar4 + 0x7c))(piVar4);
iVar6 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
local_8c = 0;
local_bc = *(float *)param_3 - fVar1;
local_b8 = *(float *)(param_3 + 4) - fVar2;
local_b4 = *(float *)(param_3 + 8) - fVar7;
local_87 = local_b8 * local_b8 + local_bc * local_bc + local_b4 * local_b4 != 0.0;
local_9c = (*(float *)(iVar5 + 0x18) - *(float *)(iVar6 + 0xc)) * 0.5;
local_98 = (*(float *)(iVar5 + 0x1c) - *(float *)(iVar6 + 0x10)) * 0.5;
local_94 = (*(float *)(iVar5 + 0x20) - *(float *)(iVar6 + 0x14)) * 0.5;
local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
local_ac = (*(float *)(iVar5 + 0x18) + *(float *)(iVar6 + 0xc)) * 0.5;
local_a8 = (*(float *)(iVar5 + 0x1c) + *(float *)(iVar6 + 0x10)) * 0.5;
local_a4 = (*(float *)(iVar5 + 0x20) + *(float *)(iVar6 + 0x14)) * 0.5;
local_cc = fVar1 + local_ac;
local_c4 = fVar7 + local_a4;
local_c8 = fVar2 + local_a8;
local_ac = -local_ac;
local_a8 = -local_a8;
local_a4 = -local_a4;
CTraceFilterSimple::CTraceFilterSimple(local_dc,pIVar3,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x201400b,local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0xff,0,true,-1.0);
}
return 1.0 <= local_44;
}
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.