L L4D2node

CTriggerImpact::StartTouch

0x00b15ec0 · 446 bytes · __thiscall

_ZN14CTriggerImpact10StartTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CTriggerImpact::StartTouch(CBaseEntity*) */

void __thiscall CTriggerImpact::StartTouch(CTriggerImpact *this,CBaseEntity *param_1)

{
  float fVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  float fVar6;
  float local_24;
  float local_20;
  float local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  if ((param_1 != (CBaseEntity *)0x0) && (*(int *)(param_1 + 0x238) != 0)) {
    AngleVectors((QAngle *)(this + 0x3a8),(Vector *)&local_24);
    fVar1 = *(float *)(this + 0x5c4);
    iVar3 = rand();
    fVar6 = fVar1 * 6.103702e-05;
    iVar4 = rand();
    iVar5 = rand();
    local_24 = (local_24 - fVar1) + (float)iVar3 * fVar6;
    local_20 = (local_20 - fVar1) + (float)iVar4 * fVar6;
    local_1c = (local_1c - fVar1) + (float)iVar5 * fVar6;
    local_10 = *(float *)(this + 0x5c0);
    local_18 = local_24 * local_10;
    local_14 = local_20 * local_10;
    local_10 = local_1c * local_10;
    (**(code **)(**(int **)(param_1 + 0x238) + 0xf4))(*(int **)(param_1 + 0x238),&local_18);
  }
  cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
  if ((cVar2 != '\0') && (0.0 < ABS(*(float *)(this + 0x5c0)))) {
    AngleVectors((QAngle *)(this + 0x3a8),(Vector *)&local_24);
    local_14 = 0.0;
    local_18 = -*(float *)(this + 0x5c8) * *(float *)(this + 0x5c0) * 0.1;
    local_10 = local_24 * local_18;
    local_18 = local_18 * local_20;
    CBaseEntity::ViewPunch(param_1,(QAngle *)&local_18);
  }
  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)