CPropVehicleDriveable::DriveVehicle
0x00b33f10 · 965 bytes · __cdecl
_ZN21CPropVehicleDriveable12DriveVehicleEfP8CUserCmdii
Decompiled
undefined (4 params)
/* CPropVehicleDriveable::DriveVehicle(float, CUserCmd*, int, int) */
void CPropVehicleDriveable::DriveVehicle(float param_1,CUserCmd *param_2,int param_3,int param_4)
{
float fVar1;
uint uVar2;
CBaseEdict *pCVar3;
int iVar4;
int iVar5;
uint uVar6;
undefined4 uVar7;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
uVar2 = *(uint *)(param_3 + 0x24);
CFourWheelVehiclePhysics::UpdateDriverControls
((CFourWheelVehiclePhysics *)((int)param_1 + 0x13f8),(CUserCmd *)param_3,(float)param_2)
;
iVar5 = *(int *)((int)param_1 + 0x1420);
if (iVar5 != *(int *)((int)param_1 + 0x15ec)) {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(int *)((int)param_1 + 0x15ec) = iVar5;
}
iVar5 = 0;
if (-1 < *(int *)((int)param_1 + 0x1428)) {
iVar5 = *(int *)((int)param_1 + 0x1428);
}
iVar4 = 0xfff;
if (iVar5 < 0x1000) {
iVar4 = iVar5;
}
if (*(int *)((int)param_1 + 0x15f0) != iVar4) {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(int *)((int)param_1 + 0x15f0) = iVar4;
}
iVar5 = *(int *)((int)param_1 + 0x1430);
if (iVar5 != *(int *)((int)param_1 + 0x15f8)) {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(int *)((int)param_1 + 0x15f8) = iVar5;
}
uVar6 = (uint)(*(int *)((int)param_1 + 0x1434) != 0);
if (uVar6 != *(uint *)((int)param_1 + 0x15fc)) {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(uint *)((int)param_1 + 0x15fc) = uVar6;
}
fVar1 = *(float *)((int)param_1 + 0x1404);
if (fVar1 != *(float *)(&DAT_000015f4 + (int)param_1)) {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(float *)(&DAT_000015f4 + (int)param_1) = fVar1;
}
if (*(char *)((int)param_1 + 0x161a) != '\0') {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(undefined1 *)((int)param_1 + 0x161a) = 0;
}
if (*(char *)((int)param_1 + 0x161b) != '\0') {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)((int)param_1 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(undefined1 *)((int)param_1 + 0x161b) = 0;
}
if ((param_4 & 1U) != 0) {
COutputEvent::FireOutput
((COutputEvent *)((int)param_1 + 0x1588),(CBaseEntity *)param_1,(CBaseEntity *)param_1
,0.0);
}
if ((param_4 & 0x800U) != 0) {
COutputEvent::FireOutput
((COutputEvent *)((int)param_1 + 0x15a0),(CBaseEntity *)param_1,(CBaseEntity *)param_1
,0.0);
}
local_38 = 0x3f800000;
if ((uVar2 & 1) == 0) {
local_38 = 0;
}
uVar7 = 0;
if ((uVar2 & 0x800) != 0) {
uVar7 = 0x3f800000;
}
variant_t::Set((variant_t *)((int)param_1 + 0x15b8),1,&local_38);
local_30 = *(undefined4 *)((int)param_1 + 0x15b8);
local_2c = *(undefined4 *)((int)param_1 + 0x15bc);
local_28 = *(undefined4 *)((int)param_1 + 0x15c0);
local_24 = *(undefined4 *)((int)param_1 + 0x15c4);
local_20 = *(undefined4 *)((int)param_1 + 0x15c8);
CBaseEntityOutput::FireOutput
((CBaseEntityOutput *)((int)param_1 + 0x15b8),&local_30,param_1,param_1,0);
local_34 = uVar7;
variant_t::Set((variant_t *)((int)param_1 + 0x15d0),1,&local_34);
local_30 = *(undefined4 *)((int)param_1 + 0x15d0);
local_2c = *(undefined4 *)((int)param_1 + 0x15d4);
local_28 = *(undefined4 *)((int)param_1 + 0x15d8);
local_24 = *(undefined4 *)((int)param_1 + 0x15dc);
local_20 = *(undefined4 *)((int)param_1 + 0x15e0);
CBaseEntityOutput::FireOutput
((CBaseEntityOutput *)((int)param_1 + 0x15d0),&local_30,param_1,param_1,0);
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.