L L4D2node

CNavArea::RecomputeAverageLightIntensity

0x00703f60 · 97 bytes · __thiscall

_ZN8CNavArea30RecomputeAverageLightIntensityEv

Decompiled

undefined (1 param)

/* CNavArea::RecomputeAverageLightIntensity() */

void __thiscall CNavArea::RecomputeAverageLightIntensity(CNavArea *this)

{
  int iVar1;
  float fVar2;
  
  fVar2 = (*(float *)(this + 0xdc) + *(float *)(this + 0xe0) + *(float *)(this + 0xe8) +
          *(float *)(this + 0xe4)) * 63.75;
  if (255.0 <= fVar2) {
    this[0x3b] = (CNavArea)0xff;
    return;
  }
  if (0.0 < fVar2) {
    iVar1 = (int)fVar2;
    if ((float)iVar1 < fVar2) {
      iVar1 = iVar1 + 1;
    }
    this[0x3b] = SUB41(iVar1,0);
    return;
  }
  this[0x3b] = (CNavArea)0x0;
  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)