CBaseServerVehicle::GetEntryAnimForPoint
0x00b36c70 · 527 bytes · __thiscall
_ZN18CBaseServerVehicle20GetEntryAnimForPointERK6Vector
Decompiled
undefined (2 params)
/* CBaseServerVehicle::GetEntryAnimForPoint(Vector const&) */
undefined4 __thiscall
CBaseServerVehicle::GetEntryAnimForPoint(CBaseServerVehicle *this,Vector *param_1)
{
char cVar1;
CBaseEntity *this_00;
int iVar2;
undefined4 uVar3;
int iVar4;
int *piVar5;
int iVar6;
CStudioHdr *pCVar7;
int *piVar8;
Vector local_70 [12];
QAngle local_64 [12];
Vector local_58 [12];
matrix3x4_t local_4c [60];
if (this[0x68] == (CBaseServerVehicle)0x0) {
(**(code **)(*(int *)this + 0xf4))(this);
this[0x68] = (CBaseServerVehicle)0x1;
}
if (*(int *)(this + 0x4c) == 0) {
return 0;
}
if ((*(int *)(this + 0x2c) != 0) &&
(this_00 = (CBaseEntity *)
__dynamic_cast(*(int *)(this + 0x2c),&CBaseEntity::typeinfo,
&CBaseAnimating::typeinfo,0), this_00 != (CBaseEntity *)0x0)) {
pCVar7 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar7 == (CStudioHdr *)0x0) {
iVar2 = CBaseEntity::GetModel(this_00);
if (iVar2 == 0) {
pCVar7 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this_00);
pCVar7 = *(CStudioHdr **)(this_00 + 0x13e0);
}
if (pCVar7 == (CStudioHdr *)0x0) {
return 0;
}
}
if (*(int *)pCVar7 != 0) {
iVar2 = FindHitboxSetByName(pCVar7,"entryboxes");
iVar2 = *(int *)pCVar7 + *(int *)(*(int *)pCVar7 + 0xb0) + iVar2 * 0xc;
if ((iVar2 != 0) && (*(int *)(iVar2 + 4) != 0)) {
if (0 < *(int *)(iVar2 + 4)) {
iVar6 = 0;
do {
piVar5 = (int *)(iVar6 * 0x44 + *(int *)(iVar2 + 8) + iVar2);
CBaseAnimating::GetBonePosition((CBaseAnimating *)this_00,*piVar5,local_70,local_64);
AngleMatrix(local_64,local_70,local_4c);
VectorITransform((float *)param_1,local_4c,(float *)local_58);
cVar1 = IsPointInBox(local_58,(Vector *)(piVar5 + 2),(Vector *)(piVar5 + 5));
if ((cVar1 != '\0') && (0 < *(int *)(this + 0x4c))) {
piVar8 = *(int **)(this + 0x40);
if (*piVar8 == piVar5[1]) {
LAB_00b36e60:
uVar3 = CBaseAnimating::LookupSequence
((CBaseAnimating *)this_00,(char *)(piVar8 + 1));
return uVar3;
}
iVar4 = 0;
while( true ) {
piVar8 = piVar8 + 0x21;
iVar4 = iVar4 + 1;
if (iVar4 == *(int *)(this + 0x4c)) break;
if (*piVar8 == piVar5[1]) goto LAB_00b36e60;
}
}
iVar6 = iVar6 + 1;
} while (iVar6 < *(int *)(iVar2 + 4));
}
return 0xffffffff;
}
}
}
return 0;
}
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.