CBaseServerVehicle::HandleEntryExitFinish
0x00b38090 · 784 bytes · __thiscall
_ZN18CBaseServerVehicle21HandleEntryExitFinishEbb
Decompiled
undefined (3 params)
/* CBaseServerVehicle::HandleEntryExitFinish(bool, bool) */
void __thiscall
CBaseServerVehicle::HandleEntryExitFinish(CBaseServerVehicle *this,bool param_1,bool param_2)
{
float fVar1;
CBaseEdict *pCVar2;
char cVar3;
CBaseAnimating *this_00;
int iVar4;
int *piVar5;
int iVar6;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if (this[0x68] == (CBaseServerVehicle)0x0) {
(**(code **)(*(int *)this + 0xf4))(this);
this[0x68] = (CBaseServerVehicle)0x1;
}
this_00 = (CBaseAnimating *)(**(code **)(**(int **)(this + 0x2c) + 0xf0))(*(int **)(this + 0x2c));
if (this_00 != (CBaseAnimating *)0x0) {
if (param_1) {
piVar5 = (int *)(**(code **)(*(int *)this + 0xf0))(this);
if (piVar5 != (int *)0x0) {
cVar3 = (**(code **)(*piVar5 + 0x16c))(piVar5);
if (cVar3 != '\0') {
iVar4 = *(int *)(this + 0x6c);
if ((iVar4 < 0) || (*(int *)(this + 0x60) <= iVar4)) {
CBaseAnimating::GetAttachment
(this_00,"vehicle_driver_eyes",(Vector *)&local_4c,(QAngle *)&local_40);
}
else {
iVar4 = iVar4 * 0x9c + *(int *)(this + 0x54);
local_4c = *(undefined4 *)(iVar4 + 0x84);
local_48 = *(undefined4 *)(iVar4 + 0x88);
local_44 = *(undefined4 *)(iVar4 + 0x8c);
local_40 = *(undefined4 *)(iVar4 + 0x90);
local_3c = *(undefined4 *)(iVar4 + 0x94);
local_38 = *(undefined4 *)(iVar4 + 0x98);
UTIL_ParentToWorldSpace((CBaseEntity *)this_00,(Vector *)&local_4c,(QAngle *)&local_40);
local_4c = *(undefined4 *)(this + 0x70);
local_48 = *(undefined4 *)(this + 0x74);
local_44 = *(undefined4 *)(this + 0x78);
}
if (*(int *)(g_debug_vehicleexit._28_4_ + 0x30) != 0) {
local_28 = 0x40000000;
local_24 = 0x40000000;
local_20 = 0x40000000;
local_34 = 0xc0000000;
local_30 = 0xc0000000;
local_2c = 0xc0000000;
NDebugOverlay::Box((Vector *)&local_4c,(Vector *)&local_34,(Vector *)&local_28,0xff,0,0,
0x40,10.0);
}
(**(code **)(*piVar5 + 0x6a0))(piVar5,(Vector *)&local_4c,&local_40);
}
}
}
if (param_2) {
iVar4 = (**(code **)(*(int *)this_00 + 0x340))(this_00,1);
if (-1 < iVar4) {
if (*(float *)(this_00 + 0x490) != 0.0) {
if (this_00[0x6c] == (CBaseAnimating)0x0) {
pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this_00[0x70] = (CBaseAnimating)((byte)this_00[0x70] | 1);
}
*(undefined4 *)(this_00 + 0x490) = 0;
}
fVar1 = *(float *)(gpGlobals + 0xc);
if (fVar1 != *(float *)(this_00 + 0x90)) {
if (this_00[0x6c] == (CBaseAnimating)0x0) {
pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this_00[0x70] = (CBaseAnimating)((byte)this_00[0x70] | 1);
}
*(float *)(this_00 + 0x90) = fVar1;
}
CBaseAnimating::ResetSequence(this_00,iVar4);
CBaseAnimating::ResetClientsideFrame(this_00);
}
}
(**(code **)(**(int **)(this + 0x30) + 0x1c))(*(int **)(this + 0x30),0);
(**(code **)(**(int **)(this + 0x30) + 0x20))
(*(int **)(this + 0x30),0,vec3_origin,DAT_01053d4c,DAT_01053d50);
}
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.