L L4D2node

CEnvPlayerSurfaceTrigger::PlayerSurfaceChanged

0x006932f0 · 177 bytes · __thiscall

_ZN24CEnvPlayerSurfaceTrigger20PlayerSurfaceChangedEP11CBasePlayerc

Decompiled

undefined (3 params)

/* CEnvPlayerSurfaceTrigger::PlayerSurfaceChanged(CBasePlayer*, char) */

void __thiscall
CEnvPlayerSurfaceTrigger::PlayerSurfaceChanged
          (CEnvPlayerSurfaceTrigger *this,CBasePlayer *param_1,char param_2)

{
  int iVar1;
  int iVar2;
  undefined1 local_14 [8];
  
  if (this[0x448] == (CEnvPlayerSurfaceTrigger)0x0) {
    iVar1 = *(int *)(this + 0x444);
    if (param_2 != (char)iVar1) {
      iVar2 = (int)param_2;
      if ((iVar2 == *(int *)(this + 0x440)) || (iVar1 == *(int *)(this + 0x440))) {
        DevMsg(2,"Player changed material to %d (was %d)\n",iVar2,iVar1);
        *(int *)(this + 0x444) = iVar2;
        CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)UpdateMaterialThink);
        CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
        return;
      }
    }
  }
  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)