L L4D2node

CDirectorItemManager::CalculateScavengeWalkableArea

0x008a4c60 · 113 bytes · __cdecl

_ZNK20CDirectorItemManager29CalculateScavengeWalkableAreaEv

Decompiled

undefined (0 params)

/* CDirectorItemManager::CalculateScavengeWalkableArea() const */

longdouble CDirectorItemManager::CalculateScavengeWalkableArea(void)

{
  int iVar1;
  int *piVar2;
  float fVar3;
  
  fVar3 = 0.0;
  if (0 < DAT_00fe6000) {
    fVar3 = 0.0;
    piVar2 = TheNavAreas;
    do {
      iVar1 = *piVar2;
      if ((0.0 < *(float *)(iVar1 + 0x154) || *(float *)(iVar1 + 0x154) == 0.0) &&
         ((*(byte *)(iVar1 + 300) & 0x40) == 0)) {
        fVar3 = fVar3 + (*(float *)(iVar1 + 0x14) - *(float *)(iVar1 + 8)) *
                        (*(float *)(iVar1 + 0x10) - *(float *)(iVar1 + 4));
      }
      piVar2 = piVar2 + 1;
    } while (piVar2 != TheNavAreas + DAT_00fe6000);
    fVar3 = fVar3 * 7.716049e-08;
  }
  return (longdouble)fVar3;
}

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)