L L4D2node

CreateAirboat

0x007a7c80 · 498 bytes · __regparm3

_ZL13CreateAirboatP11CBasePlayer

Decompiled

undefined (1 param)

/* CreateAirboat(CBasePlayer*) */

void __regparm3 CreateAirboat(CBasePlayer *param_1)

{
  QAngle *pQVar1;
  CBaseEntity *this;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  float local_1c;
  undefined4 local_18;
  float local_14;
  undefined4 local_10;
  
  pQVar1 = (QAngle *)(**(code **)(*(int *)param_1 + 0x238))(param_1);
  AngleVectors(pQVar1,(Vector *)&local_30);
  this = (CBaseEntity *)CreateEntityByName("prop_vehicle_airboat",-1,true);
  if (this != (CBaseEntity *)0x0) {
    if (((byte)param_1[0x14d] & 8) == 0) {
      local_20 = local_2c * 256.0 + *(float *)(param_1 + 0x2e4);
      local_24 = local_30 * 256.0 + *(float *)(param_1 + 0x2e0);
      local_1c = *(float *)(param_1 + 0x2e8) + 64.0 + local_28 * 256.0;
    }
    else {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
      local_20 = local_2c * 256.0 + *(float *)(param_1 + 0x2e4);
      local_24 = local_30 * 256.0 + *(float *)(param_1 + 0x2e0);
      local_1c = *(float *)(param_1 + 0x2e8) + 64.0 + local_28 * 256.0;
      if ((*(uint *)(param_1 + 0x14c) & 0x800) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
      }
    }
    local_14 = *(float *)(param_1 + 0x380) - 90.0;
    local_18 = 0;
    local_10 = 0;
    CBaseEntity::SetAbsOrigin(this,(Vector *)&local_24);
    CBaseEntity::SetAbsAngles(this,(QAngle *)&local_18);
    (**(code **)(*(int *)this + 0x84))(this,"model","models/airboat.mdl");
    (**(code **)(*(int *)this + 0x84))(this,"solid","6");
    (**(code **)(*(int *)this + 0x84))(this,"targetname","airboat");
    (**(code **)(*(int *)this + 0x84))(this,"vehiclescript","scripts/vehicles/airboat.txt");
    DispatchSpawn(this,true);
    (**(code **)(*(int *)this + 0x94))(this);
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)