L L4D2node

ZombieBotVision::GetNearNoticeRange

0x00a571d0 · 162 bytes · __thiscall

_ZNK15ZombieBotVision18GetNearNoticeRangeEv

Decompiled

undefined (1 param)

/* ZombieBotVision::GetNearNoticeRange() const */

longdouble __thiscall ZombieBotVision::GetNearNoticeRange(ZombieBotVision *this)

{
  float fVar1;
  char cVar2;
  int *piVar3;
  CBaseEntity *pCVar4;
  int iVar5;
  
  fVar1 = *(float *)(ZombieNoticeNearRange._28_4_ + 0x2c);
  cVar2 = IsTimeOfDayBetween(2,4);
  if (cVar2 == '\0') {
    piVar3 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
    pCVar4 = (CBaseEntity *)(**(code **)(*piVar3 + 0xb4))(piVar3);
    iVar5 = CBaseEntity::GetGender(pCVar4);
    if (iVar5 != 0x10) {
      piVar3 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
      pCVar4 = (CBaseEntity *)(**(code **)(*piVar3 + 0xb4))(piVar3);
      iVar5 = CBaseEntity::GetGender(pCVar4);
      if (iVar5 != 0x11) {
        return (longdouble)fVar1;
      }
    }
  }
  return (longdouble)*(float *)(ZombieVisionRangeDaylight._28_4_ + 0x2c);
}

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)