L L4D2node

CSpitterProjectile::BounceTouch

0x0055b840 · 477 bytes · __thiscall

_ZN18CSpitterProjectile11BounceTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CSpitterProjectile::BounceTouch(CBaseEntity*) */

void __thiscall CSpitterProjectile::BounceTouch(CSpitterProjectile *this,CBaseEntity *param_1)

{
  char cVar1;
  CBaseEntity *pCVar2;
  int iVar3;
  float local_18;
  float local_14;
  undefined4 local_10;
  
  if (((((byte)param_1[0x1b4] & 0x28) == 0) || (*(int *)(param_1 + 0x234) == 0xb)) &&
     (pCVar2 = (CBaseEntity *)CBaseGrenade::GetThrower((CBaseGrenade *)this), param_1 != pCVar2)) {
    iVar3 = CBaseEntity::GetTeamNumber(param_1);
    cVar1 = IsASurvivorTeam(iVar3);
    if (cVar1 != '\0') {
      CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
      if (((byte)param_1[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(param_1);
      }
      CBaseEntity::SetAbsOrigin((CBaseEntity *)this,(Vector *)(param_1 + 0x2e0));
      (**(code **)(*(int *)this + 0x56c))(this);
      return;
    }
    iVar3 = CBaseEntity::GetTeamNumber(param_1);
    if (((iVar3 != 3) ||
        ((iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar3 == 3 &&
         (iVar3 = (**(code **)(*(int *)this + 0x544))(this), iVar3 == 0)))) &&
       ((CBaseEntity::SetMoveType((CBaseEntity *)this,5,1),
        *(char **)(param_1 + 0x7c) != "func_breakable" &&
        (((cVar1 = CBaseEntity::ClassMatchesComplex(param_1,"func_breakable"), cVar1 == '\0' &&
          (*(char **)(param_1 + 0x7c) != "func_breakable_surf")) &&
         (cVar1 = CBaseEntity::ClassMatchesComplex(param_1,"func_breakable_surf"), cVar1 == '\0'))))
       )) {
      iVar3 = CBaseEntity::GetTouchTrace();
      if (((byte)this[0x150] & 1) == 0) {
        (**(code **)(*(int *)this + 0x574))(this);
      }
      if (*(float *)(iVar3 + 0x20) < 0.0) {
        if (((byte)this[0x14d] & 0x10) != 0) {
          CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
        }
        local_10 = 0xc1200000;
        local_18 = *(float *)(this + 0x274) * 0.5;
        local_14 = *(float *)(this + 0x278) * 0.5;
        CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_18);
      }
      else if (0.5 < *(float *)(iVar3 + 0x20)) {
        (**(code **)(*(int *)this + 0x56c))(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)