CPropVehicleDriveable::TraceAttack
0x00b33550 · 570 bytes · __thiscall
_ZN21CPropVehicleDriveable11TraceAttackERK15CTakeDamageInfoRK6VectorP10CGameTrace
Decompiled
undefined (4 params)
/* CPropVehicleDriveable::TraceAttack(CTakeDamageInfo const&, Vector const&, CGameTrace*) */
void __thiscall
CPropVehicleDriveable::TraceAttack
(CPropVehicleDriveable *this,CTakeDamageInfo *param_1,Vector *param_2,CGameTrace *param_3)
{
float fVar1;
int iVar2;
int *piVar3;
uint *puVar4;
uint uVar5;
undefined *puVar6;
longdouble lVar7;
float *local_40;
float local_30 [3];
undefined4 local_24;
undefined4 local_20;
if (((byte)param_1[0x4a] & 0x80) == 0) goto LAB_00b33565;
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x3b4))(this);
if ((float)lVar7 == 0.0) goto LAB_00b33565;
uVar5 = *(uint *)(this + 0x1620);
if ((((uVar5 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar5 >> 0xc)) ||
(piVar3 = *(int **)(puVar6 + 4), piVar3 == (int *)0x0)) {
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x3b4))(this);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
piVar3 = (int *)CreateKeepUpright((Vector *)(this + 0x2e0),(QAngle *)&vec3_angle,
(CBaseEntity *)this,(float)lVar7,false);
if (piVar3 != (int *)0x0) {
puVar4 = (uint *)(**(code **)(*piVar3 + 0xc))(piVar3);
uVar5 = *puVar4;
*(uint *)(this + 0x1620) = uVar5;
goto LAB_00b33648;
}
*(undefined4 *)(this + 0x1620) = 0xffffffff;
piVar3 = (int *)0x0;
}
else {
local_24 = 0xffffffff;
local_20 = 1;
local_30[0] = (float)lVar7;
(**(code **)(*piVar3 + 0xb4))(piVar3,"SetAngularLimit",this,this,local_30,3);
uVar5 = *(uint *)(this + 0x1620);
LAB_00b33648:
piVar3 = (int *)0x0;
if (((uVar5 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar5 >> 0xc)) {
piVar3 = *(int **)(puVar6 + 4);
}
}
local_40 = local_30;
local_30[0] = 0.0;
local_24 = 0xffffffff;
local_20 = 0;
(**(code **)(*piVar3 + 0xb4))(piVar3,"TurnOn",this,this,local_40,3);
fVar1 = *(float *)(gpGlobals + 0xc);
lVar7 = (longdouble)(**(code **)(*(int *)this + 0x3b8))(this);
iVar2 = gpGlobals;
*(float *)(this + 0x1630) = (float)lVar7 + fVar1;
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(iVar2 + 0xc),(char *)0x0);
LAB_00b33565:
CBaseEntity::TraceAttack((CBaseEntity *)this,param_1,param_2,param_3);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.