CBaseServerVehicle::HandlePassengerEntry
0x00b37ea0 · 452 bytes · __thiscall
_ZN18CBaseServerVehicle20HandlePassengerEntryEP20CBaseCombatCharacterb
Decompiled
undefined (3 params)
/* CBaseServerVehicle::HandlePassengerEntry(CBaseCombatCharacter*, bool) */
void __thiscall
CBaseServerVehicle::HandlePassengerEntry
(CBaseServerVehicle *this,CBaseCombatCharacter *param_1,bool param_2)
{
float fVar1;
code *pcVar2;
CBaseEdict *pCVar3;
char cVar4;
CBaseAnimating *this_00;
int iVar5;
int local_34;
undefined1 local_28 [24];
if ((param_1 != (CBaseCombatCharacter *)0x0) &&
(cVar4 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar4 != '\0')) {
pcVar2 = *(code **)(*(int *)this + 0x50);
(**(code **)(*(int *)param_1 + 0x234))(local_28,param_1);
local_34 = (*pcVar2)(this,local_28);
if ((*(int *)(this + 0x2c) != 0) &&
(this_00 = (CBaseAnimating *)
__dynamic_cast(*(int *)(this + 0x2c),&CBaseEntity::typeinfo,
&CBaseAnimating::typeinfo,0), this_00 != (CBaseAnimating *)0x0)) {
if (local_34 == -1) {
if (!param_2) {
return;
}
local_34 = CBaseAnimating::LookupSequence(this_00,(char *)(*(int *)(this + 0x40) + 4));
}
cVar4 = (**(code **)(**(int **)(this + 0x30) + 0x14))(*(int **)(this + 0x30),param_1);
if ((cVar4 != '\0') &&
(cVar4 = CBasePlayer::CanEnterVehicle((CBasePlayer *)param_1,(IServerVehicle *)this,0),
cVar4 != '\0')) {
if (*(float *)(this_00 + 0x490) != 0.0) {
if (this_00[0x6c] == (CBaseAnimating)0x0) {
pCVar3 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 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) {
pCVar3 = *(CBaseEdict **)(this_00 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this_00[0x70] = (CBaseAnimating)((byte)this_00[0x70] | 1);
}
*(float *)(this_00 + 0x90) = fVar1;
}
CBaseAnimating::ResetSequence(this_00,local_34);
CBaseAnimating::ResetClientsideFrame(this_00);
CBaseAnimating::InvalidateBoneCache(this_00);
(**(code **)(**(int **)(this + 0x30) + 0x1c))(*(int **)(this + 0x30),1);
(**(code **)(*(int *)param_1 + 0x69c))(param_1,this,0);
return;
}
}
}
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.