L L4D2node

CWaterBullet::Spawn

0x00b5e440 · 365 bytes · __thiscall

_ZN12CWaterBullet5SpawnERK6VectorS2_

Decompiled

undefined (3 params)

/* CWaterBullet::Spawn(Vector const&, Vector const&) */

void __thiscall CWaterBullet::Spawn(CWaterBullet *this,Vector *param_1,Vector *param_2)

{
  undefined1 local_24 [12];
  float local_18;
  float local_14;
  float local_10;
  
  (**(code **)(*(int *)this + 0x6c))(this);
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),2);
  (**(code **)(*(int *)this + 0x70))(this,"models/weapons/w_bullet.mdl");
  UTIL_SetSize((CBaseEntity *)this,(Vector *)&vec3_origin,(Vector *)&vec3_origin);
  CBaseEntity::SetMoveType((CBaseEntity *)this,4,0);
  *(undefined4 *)(this + 0x2c0) = 0;
  CBaseEntity::SetAbsOrigin((CBaseEntity *)this,param_1);
  local_18 = *(float *)param_2 * 1500.0;
  local_14 = *(float *)(param_2 + 4) * 1500.0;
  local_10 = *(float *)(param_2 + 8) * 1500.0;
  CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_18);
  if (((byte)this[0x14d] & 0x10) != 0) {
    CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
  }
  VectorAngles((Vector *)(this + 0x274),(QAngle *)&local_18);
  CBaseEntity::SetAbsAngles((CBaseEntity *)this,(QAngle *)&local_18);
  CBaseEntity::SetCollisionGroup((CBaseEntity *)this,1);
  *(undefined4 *)(this + 0xd8) = 0x1b5;
  *(undefined4 *)(this + 0xdc) = 0;
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)BulletThink);
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
  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)