L L4D2node

CPlatTrigger::SpawnInsideTrigger

0x00b0b340 · 927 bytes · __thiscall

_ZN12CPlatTrigger18SpawnInsideTriggerEP9CFuncPlat

Decompiled

undefined (2 params)

/* WARNING: Removing unreachable block (ram,0x00b0b511) */
/* WARNING: Removing unreachable block (ram,0x00b0b47c) */
/* WARNING: Removing unreachable block (ram,0x00b0b6e7) */
/* WARNING: Removing unreachable block (ram,0x00b0b6f0) */
/* CPlatTrigger::SpawnInsideTrigger(CFuncPlat*) */

void __thiscall CPlatTrigger::SpawnInsideTrigger(CPlatTrigger *this,CFuncPlat *param_1)

{
  int iVar1;
  float *pfVar2;
  int iVar3;
  int iVar4;
  Vector *pVVar5;
  undefined4 uVar6;
  float fVar7;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  *(CFuncPlat **)(this + 0x440) = param_1;
  pVVar5 = (Vector *)(param_1 + 0x39c);
  CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),1);
  CCollisionProperty::SetSolidFlags
            ((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 8));
  uVar6 = 0;
  CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
  CBaseEntity::SetLocalOrigin((CBaseEntity *)this,pVVar5);
  iVar1 = *(int *)(this + 0x440);
  iVar3 = iVar1 + 0x194;
  pfVar2 = (float *)(**(code **)(*(int *)(iVar1 + 0x194) + 4))(iVar3);
  fVar7 = 25.0;
  local_34 = *pfVar2 + 25.0;
  local_30 = pfVar2[1] + 25.0;
  local_2c = pfVar2[2];
  pfVar2 = (float *)(**(code **)(*(int *)(iVar1 + 0x194) + 8))(iVar3,pVVar5,uVar6,0x41c80000);
  local_28 = *pfVar2 + fVar7;
  local_24 = fVar7 + pfVar2[1];
  local_20 = pfVar2[2] + 8.0;
  local_2c = (local_20 + *(float *)(*(int *)(this + 0x440) + 0x468) + -8.0) -
             *(float *)(*(int *)(this + 0x440) + 0x45c);
  if ((AllocTempVector()::s_vecTemp == '\0') &&
     (iVar4 = __cxa_guard_acquire(&AllocTempVector()::s_vecTemp), iVar4 != 0)) {
    __cxa_guard_release(&AllocTempVector()::s_vecTemp);
  }
  if ((AllocTempVector()::s_nIndex == '\0') &&
     (iVar4 = __cxa_guard_acquire(&AllocTempVector()::s_nIndex), iVar4 != 0)) {
    AllocTempVector()::s_nIndex = 0;
    __cxa_guard_release(&AllocTempVector()::s_nIndex);
  }
  AllocTempVector()::s_nIndex = AllocTempVector()::s_nIndex + 0x10001 & 0x7f;
  LOCK();
  UNLOCK();
  iVar4 = AllocTempVector()::s_nIndex * 0xc;
  fVar7 = *(float *)(iVar1 + 0x1a8) - *(float *)(iVar1 + 0x19c);
  *(float *)(AllocTempVector()::s_vecTemp + iVar4) = fVar7;
  *(float *)(AllocTempVector()::s_vecTemp + iVar4 + 4) =
       *(float *)(iVar1 + 0x1ac) - *(float *)(iVar1 + 0x1a0);
  *(float *)(AllocTempVector()::s_vecTemp + iVar4 + 8) =
       *(float *)(iVar1 + 0x1b0) - *(float *)(iVar1 + 0x1a4);
  if (fVar7 <= 50.0) {
    pfVar2 = (float *)(**(code **)(*(int *)(iVar1 + 0x194) + 4))(iVar3);
    fVar7 = *pfVar2;
    pfVar2 = (float *)(**(code **)(*(int *)(iVar1 + 0x194) + 8))(iVar3,pVVar5,uVar6,fVar7);
    local_34 = (fVar7 + *pfVar2) * 0.5;
    local_28 = local_34 + 1.0;
  }
  if ((AllocTempVector()::s_vecTemp == '\0') &&
     (iVar4 = __cxa_guard_acquire(&AllocTempVector()::s_vecTemp), iVar4 != 0)) {
    __cxa_guard_release(&AllocTempVector()::s_vecTemp);
  }
  if ((AllocTempVector()::s_nIndex == '\0') &&
     (iVar4 = __cxa_guard_acquire(&AllocTempVector()::s_nIndex), iVar4 != 0)) {
    AllocTempVector()::s_nIndex = 0;
    __cxa_guard_release(&AllocTempVector()::s_nIndex);
  }
  AllocTempVector()::s_nIndex = AllocTempVector()::s_nIndex + 0x10001 & 0x7f;
  LOCK();
  UNLOCK();
  iVar4 = AllocTempVector()::s_nIndex * 0xc;
  *(float *)(AllocTempVector()::s_vecTemp + iVar4) =
       *(float *)(iVar1 + 0x1a8) - *(float *)(iVar1 + 0x19c);
  fVar7 = *(float *)(iVar1 + 0x1ac) - *(float *)(iVar1 + 0x1a0);
  *(float *)(AllocTempVector()::s_vecTemp + iVar4 + 4) = fVar7;
  *(float *)(AllocTempVector()::s_vecTemp + iVar4 + 8) =
       *(float *)(iVar1 + 0x1b0) - *(float *)(iVar1 + 0x1a4);
  if (fVar7 <= 50.0) {
    iVar4 = (**(code **)(*(int *)(iVar1 + 0x194) + 4))(iVar3);
    fVar7 = *(float *)(iVar4 + 4);
    iVar3 = (**(code **)(*(int *)(iVar1 + 0x194) + 8))(iVar3,pVVar5,uVar6,fVar7);
    local_30 = (fVar7 + *(float *)(iVar3 + 4)) * 0.5;
    local_24 = local_30 + 1.0;
  }
  UTIL_SetSize((CBaseEntity *)this,(Vector *)&local_34,(Vector *)&local_28);
  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)