CBaseServerVehicle::HandlePassengerExit
0x00b3b040 · 1065 bytes · __thiscall
_ZN18CBaseServerVehicle19HandlePassengerExitEP20CBaseCombatCharacter
Decompiled
undefined (2 params)
/* CBaseServerVehicle::HandlePassengerExit(CBaseCombatCharacter*) */
char __thiscall
CBaseServerVehicle::HandlePassengerExit(CBaseServerVehicle *this,CBaseCombatCharacter *param_1)
{
float fVar1;
CBaseEdict *pCVar2;
char cVar3;
char cVar4;
int iVar5;
undefined4 uVar6;
CBaseAnimating *this_00;
float *pfVar7;
int iVar8;
int *piVar9;
undefined4 *puVar10;
char local_61;
float local_60;
float local_5c;
float local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
float local_3c;
float local_38;
float local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined1 local_24;
undefined1 local_23;
undefined1 local_22;
undefined1 local_21;
undefined1 local_20;
if ((param_1 == (CBaseCombatCharacter *)0x0) ||
(cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar3 == '\0')) {
return '\0';
}
UTIL_HudHintText((CBaseEntity *)param_1,"");
local_24 = 0;
local_2c = 0;
local_28 = 0;
local_23 = 0;
local_30 = *(undefined4 *)(gpGlobals + 0x10);
local_22 = 0;
local_21 = 0;
local_20 = 0;
local_21 = (**(code **)(*(int *)this + 0xec))(this);
local_20 = 1;
SoundState_Update(this,(vbs_sound_update_t *)&local_30);
iVar5 = (**(code **)(*(int *)this + 0x54))(this,&local_60,&local_61);
if (((byte)param_1[0x14d] & 8) == 0) {
local_54 = *(undefined4 *)(param_1 + 0x2e0);
local_50 = *(undefined4 *)(param_1 + 0x2e4);
local_4c = *(undefined4 *)(param_1 + 0x2e8);
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
local_54 = *(undefined4 *)(param_1 + 0x2e0);
local_50 = *(undefined4 *)(param_1 + 0x2e4);
local_4c = *(undefined4 *)(param_1 + 0x2e8);
if ((*(uint *)(param_1 + 0x14c) & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
}
local_48 = *(undefined4 *)(param_1 + 0x37c);
local_44 = *(undefined4 *)(param_1 + 0x380);
local_40 = *(undefined4 *)(param_1 + 900);
uVar6 = (**(code **)(*(int *)this + 4))(this,param_1);
if ((local_61 != '\0') || (iVar5 == -1)) {
cVar4 = (**(code **)(*(int *)this + 0x4c))(this,uVar6,&local_54,&local_48);
if ((cVar4 == '\0') &&
(cVar4 = (**(code **)(**(int **)(this + 0x30) + 0x30))(*(int **)(this + 0x30),param_1,uVar6),
cVar4 == '\0')) {
return '\0';
}
(**(code **)(*(int *)this + 0x58))(this,0,1);
}
(**(code **)(**(int **)(this + 0x30) + 0x28))(*(int **)(this + 0x30),param_1,uVar6);
if (((-1 < iVar5) && (*(int *)(this + 0x2c) != 0)) &&
(this_00 = (CBaseAnimating *)
__dynamic_cast(*(int *)(this + 0x2c),&CBaseEntity::typeinfo,
&CBaseAnimating::typeinfo,0), this_00 != (CBaseAnimating *)0x0)) {
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;
iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar8 + 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;
iVar8 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar8 + 2) = 0;
}
}
else {
this_00[0x70] = (CBaseAnimating)((byte)this_00[0x70] | 1);
}
*(float *)(this_00 + 0x90) = fVar1;
}
CBaseAnimating::ResetSequence(this_00,iVar5);
CBaseAnimating::ResetClientsideFrame(this_00);
(**(code **)(**(int **)(this + 0x30) + 0x20))
(*(int **)(this + 0x30),1,local_60,local_5c,local_58);
cVar4 = (**(code **)(*(int *)param_1 + 300))(param_1);
if ((cVar4 != '\0') && (iVar5 = CBaseCombatCharacter::GetActiveWeapon(param_1), iVar5 != 0)) {
piVar9 = (int *)CBaseCombatCharacter::GetActiveWeapon(param_1);
(**(code **)(*piVar9 + 0x424))(piVar9);
CBasePlayer::ShowCrosshair((CBasePlayer *)param_1,true);
}
pfVar7 = (float *)(**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
local_3c = local_60 - *pfVar7;
local_38 = local_5c - pfVar7[1];
local_34 = local_58 - pfVar7[2];
iVar5 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar8 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
piVar9 = (int *)CEntityBlocker::Create
((Vector *)&local_3c,(Vector *)(iVar8 + 0xc),(Vector *)(iVar5 + 0x18),
(CBaseEntity *)param_1,true);
if (piVar9 == (int *)0x0) {
*(undefined4 *)(this + 0x88) = 0xffffffff;
}
else {
puVar10 = (undefined4 *)(**(code **)(*piVar9 + 0xc))(piVar9);
*(undefined4 *)(this + 0x88) = *puVar10;
}
CBaseEntity::SetAbsOrigin((CBaseEntity *)param_1,(Vector *)&local_3c);
(**(code **)(*(int *)param_1 + 0x98))(param_1,0,0xffffffff);
return cVar3;
}
(**(code **)(*(int *)param_1 + 0x6a0))(param_1,&local_54,&local_48);
return cVar3;
}
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.