L L4D2node

CTerrorGameMovement::SetGroundEntity

0x004f8390 · 218 bytes · __thiscall

_ZN19CTerrorGameMovement15SetGroundEntityEP10CGameTrace

Decompiled

undefined (2 params)

/* CTerrorGameMovement::SetGroundEntity(CGameTrace*) */

void __thiscall CTerrorGameMovement::SetGroundEntity(CTerrorGameMovement *this,CGameTrace *param_1)

{
  CBaseEntity *this_00;
  char cVar1;
  int iVar2;
  CTerrorPlayer *pCVar3;
  
  if ((param_1 != (CGameTrace *)0x0) &&
     (this_00 = *(CBaseEntity **)(param_1 + 0x4c), this_00 != (CBaseEntity *)0x0)) {
    cVar1 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
    if ((cVar1 != '\0') && (*(CTerrorPlayer **)(this + 0x810) != (CTerrorPlayer *)0x0)) {
      cVar1 = CTerrorPlayer::IsLunging(*(CTerrorPlayer **)(this + 0x810));
      if ((cVar1 != '\0') && (*(char *)(*(int *)(this + 0x810) + 0x3e78) != '\0')) {
        iVar2 = CBaseEntity::GetTeamNumber(this_00);
        cVar1 = IsASurvivorTeam(iVar2);
        if (cVar1 != '\0') {
          cVar1 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
          pCVar3 = (CTerrorPlayer *)0x0;
          if (cVar1 != '\0') {
            pCVar3 = (CTerrorPlayer *)this_00;
          }
          CTerrorPlayer::OnLungedInto(*(CTerrorPlayer **)(this + 0x810),pCVar3);
        }
      }
    }
  }
  CGameMovement::SetGroundEntity((CGameMovement *)this,param_1);
  iVar2 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(this + 4));
  if (iVar2 != 0) {
    iVar2 = *(int *)(this + 8);
    CCSPlayer::UpdateLastGroundPosition
              (*(CCSPlayer **)(this + 0x810),(Vector *)(iVar2 + 0x9c),(Vector *)(iVar2 + 0x40),
               (QAngle *)(iVar2 + 0xc));
  }
  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)