L L4D2node

IsPushAwayEntity

0x004708c0 · 223 bytes · __cdecl

_Z16IsPushAwayEntityP11CBaseEntity

Decompiled

undefined (1 param)

/* IsPushAwayEntity(CBaseEntity*) */

undefined4 IsPushAwayEntity(CBaseEntity *param_1)

{
  char cVar1;
  int iVar2;
  
  if (param_1 == (CBaseEntity *)0x0) {
    return 0;
  }
  if (*(int *)(param_1 + 0x234) == 0x11) {
    return 1;
  }
  if ((*(char **)(param_1 + 0x7c) == "func_door_rotating") ||
     (cVar1 = CBaseEntity::ClassMatchesComplex(param_1,"func_door_rotating"), cVar1 != '\0')) {
    iVar2 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CBaseDoor::typeinfo,0);
    if (iVar2 == 0) {
      return 0;
    }
    if (1 < *(int *)(iVar2 + 0x440) - 2U) {
      return 0;
    }
  }
  else {
    if ((*(char **)(param_1 + 0x7c) != "prop_door_rotating") &&
       (cVar1 = CBaseEntity::ClassMatchesComplex(param_1,"prop_door_rotating"), cVar1 == '\0')) {
      return 0;
    }
    iVar2 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CBasePropDoor::typeinfo,0);
    if (iVar2 == 0) {
      return 0;
    }
    if ((*(uint *)(&DAT_000015f4 + iVar2) & 0xfffffffd) != 1) {
      return 0;
    }
  }
  return CONCAT31((int3)((uint)*(int *)(sv_doors_push_players._28_4_ + 0x30) >> 8),
                  *(int *)(sv_doors_push_players._28_4_ + 0x30) != 0);
}

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)