L L4D2node

CTerrorPlayer::GetMovingPlatform

0x009a6660 · 120 bytes · __thiscall

_ZN13CTerrorPlayer17GetMovingPlatformEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::GetMovingPlatform() */

int __thiscall CTerrorPlayer::GetMovingPlatform(CTerrorPlayer *this)

{
  int iVar1;
  int iVar2;
  
  iVar1 = CBaseEntity::GetGroundEntity((CBaseEntity *)this);
  if ((iVar1 != 0) && (iVar1 != g_WorldEntity)) {
    iVar2 = __dynamic_cast(iVar1,&CBaseEntity::typeinfo,&CFuncElevator::typeinfo,0);
    if (iVar2 != 0) {
      return iVar2;
    }
    iVar1 = __dynamic_cast(iVar1,&CBaseEntity::typeinfo,&CFuncTrackTrain::typeinfo,0);
    return iVar1;
  }
  return 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)