L L4D2node

CFuncNavAttributeRegion::Spawn

0x00972340 · 273 bytes · __thiscall

_ZN23CFuncNavAttributeRegion5SpawnEv

Decompiled

undefined (1 param)

/* CFuncNavAttributeRegion::Spawn() */

void __thiscall CFuncNavAttributeRegion::Spawn(CFuncNavAttributeRegion *this)

{
  CCollisionProperty *this_00;
  code *pcVar1;
  undefined4 uVar2;
  int iVar3;
  undefined1 *puVar4;
  undefined1 *local_40 [3];
  undefined4 local_34;
  undefined4 local_28;
  undefined4 local_24;
  
  (**(code **)(*(int *)this + 0x20))(local_40,this);
  puVar4 = &DAT_00d539c2;
  if (local_40[0] != (undefined1 *)0x0) {
    puVar4 = local_40[0];
  }
  pcVar1 = *(code **)(*modelinfo + 8);
  uVar2 = (**(code **)(*modelinfo + 0xc))(modelinfo,puVar4);
  iVar3 = (*pcVar1)(modelinfo,uVar2);
  this_00 = (CCollisionProperty *)(this + 0x194);
  if (iVar3 == 0) {
    CCollisionProperty::SetSolid(this_00,2);
  }
  else {
    CCollisionProperty::SetSolid(this_00,1);
    (**(code **)(*(int *)this + 0x70))(this,puVar4);
  }
  CCollisionProperty::SetSolidFlags(this_00,(uint)(*(ushort *)(this + 0x1b4) | 4));
  CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
  CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
  if (*(char *)(TheNavMesh + 0x4c) != '\0') {
    local_34 = 0;
    local_28 = 0xffffffff;
    local_24 = 0;
    InputApplyNavAttributes((inputdata_t *)this);
    *(undefined1 *)(TheZombieManager + 0x289) = 1;
  }
  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)