CFourWheelVehiclePhysics::DrawDebugTextOverlays
0x006ae210 · 492 bytes · __thiscall
_ZN24CFourWheelVehiclePhysics21DrawDebugTextOverlaysEi
Decompiled
undefined (2 params)
/* CFourWheelVehiclePhysics::DrawDebugTextOverlays(int) */
int __thiscall
CFourWheelVehiclePhysics::DrawDebugTextOverlays(CFourWheelVehiclePhysics *this,int param_1)
{
uint uVar1;
float *pfVar2;
CBaseEntity *this_00;
undefined *puVar3;
int in_GS_OFFSET;
CBaseEntity *local_230;
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pfVar2 = (float *)(**(code **)(**(int **)(this + 0x24) + 0xc))(*(int **)(this + 0x24));
V_snprintf(local_220,0x200,"Speed %.1f T/S/B (%.0f/%.0f/%.1f)",(double)*pfVar2,
(double)*(float *)(this + 0xc),(double)*(float *)(this + 0x10),
(double)*(float *)(this + 0x14));
uVar1 = *(uint *)(this + 4);
local_230 = (CBaseEntity *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
local_230 = *(CBaseEntity **)(puVar3 + 4);
}
CBaseEntity::EntityText(local_230,param_1,local_220,0.0,0xff,0xff,0xff,0xff);
Msg("%s",local_220);
V_snprintf(local_220,0x200,"Gear: %d, RPM %4d",pfVar2[2]);
uVar1 = *(uint *)(this + 4);
if (((uVar1 == 0xffffffff) ||
(puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) {
this_00 = (CBaseEntity *)0x0;
}
else {
this_00 = *(CBaseEntity **)(puVar3 + 4);
}
CBaseEntity::EntityText(this_00,param_1 + 1,local_220,0.0,0xff,0xff,0xff,0xff);
Msg(&DAT_00ca5b8e,local_220);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return param_1 + 2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.