L L4D2node

CVomitJarProjectile::BounceTouch

0x00578bd0 · 386 bytes · __thiscall

_ZN19CVomitJarProjectile11BounceTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CVomitJarProjectile::BounceTouch(CBaseEntity*) */

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

{
  int *piVar1;
  char cVar2;
  CBaseEntity *pCVar3;
  int iVar4;
  int iVar5;
  float local_7c;
  float local_78;
  undefined4 local_74;
  
  if (((byte)param_1[0x1b4] & 0x28) != 0) {
    return;
  }
  pCVar3 = (CBaseEntity *)CBaseGrenade::GetThrower((CBaseGrenade *)this);
  if (param_1 == pCVar3) {
    return;
  }
  if (*(char **)(param_1 + 0x7c) == "func_breakable") {
    return;
  }
  cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"func_breakable");
  if (cVar2 == '\0') {
    if (*(char **)(param_1 + 0x7c) == "func_breakable_surf") {
      return;
    }
    cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"func_breakable_surf");
    if (cVar2 == '\0') {
      if ((((*(char **)(param_1 + 0x7c) == "prop_car_alarm") ||
           (cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"prop_car_alarm"), cVar2 != '\0')) ||
          (*(char **)(param_1 + 0x7c) == "prop_car_glass")) ||
         (cVar2 = CBaseEntity::ClassMatchesComplex(param_1,"prop_car_glass"), cVar2 != '\0')) {
        pCVar3 = (CBaseEntity *)CBaseGrenade::GetThrower((CBaseGrenade *)this);
        CTakeDamageInfo::CTakeDamageInfo
                  ((CTakeDamageInfo *)&local_7c,(CBaseEntity *)this,pCVar3,10.0,0,0);
        (**(code **)(*(int *)param_1 + 0x124))(param_1,(CTakeDamageInfo *)&local_7c);
      }
      iVar4 = CBaseEntity::GetTouchTrace();
      piVar1 = *(int **)(iVar4 + 0x4c);
      if (((piVar1 == (int *)0x0) || (iVar5 = (**(code **)(*piVar1 + 0x144))(piVar1), iVar5 == 0))
         && (*(float *)(iVar4 + 0x20) <= 0.0)) {
        if (((byte)this[0x14d] & 0x10) != 0) {
          CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
        }
        local_74 = 0xc1200000;
        local_7c = *(float *)(this + 0x274) * 0.5;
        local_78 = *(float *)(this + 0x278) * 0.5;
        CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_7c);
        return;
      }
      (**(code **)(*(int *)this + 0x56c))(this);
      return;
    }
    return;
  }
  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)