L L4D2node

CNavMesh::CommandNavWarpToMark

0x0070d600 · 558 bytes · __thiscall

_ZN8CNavMesh20CommandNavWarpToMarkEv

Decompiled

undefined (1 param)

/* CNavMesh::CommandNavWarpToMark() */

void __thiscall CNavMesh::CommandNavWarpToMark(CNavMesh *this)

{
  char cVar1;
  CBasePlayer *this_00;
  int iVar2;
  float *pfVar3;
  float *pfVar4;
  float local_24;
  undefined4 local_20;
  float local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  this_00 = (CBasePlayer *)UTIL_GetListenServerHost();
  if ((this_00 == (CBasePlayer *)0x0) || (*(int *)(this + 0x458) != 0)) {
    return;
  }
  iVar2 = GetMarkedArea(this);
  if ((iVar2 == 0) &&
     ((*(int *)(this + 0x4e0) == 0 || (iVar2 = **(int **)(this + 0x4d4), iVar2 == 0)))) {
    iVar2 = *(int *)(this + 0x4c4);
    if (iVar2 == 0) goto LAB_0070d6c4;
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this_00);
    }
    local_24 = *(float *)(this_00 + 0x37c);
    local_20 = *(undefined4 *)(this_00 + 0x380);
    local_1c = *(float *)(this_00 + 900);
    local_10 = (*(float *)(iVar2 + 0x18) + *(float *)(iVar2 + 0xc)) * 0.5;
    local_18 = (*(float *)(iVar2 + 0x10) + *(float *)(iVar2 + 4)) * 0.5 +
               *(float *)(iVar2 + 0x40) * 25.0;
    local_14 = (*(float *)(iVar2 + 0x14) + *(float *)(iVar2 + 8)) * 0.5 +
               *(float *)(iVar2 + 0x44) * 25.0;
    cVar1 = CBasePlayer::IsDead(this_00);
    if ((cVar1 != '\0') || (((byte)this_00[0x1d20] & 8) != 0)) {
      iVar2 = (**(code **)(*(int *)this_00 + 0x648))(this_00);
      if (iVar2 == 6) {
        UTIL_SetOrigin((CBaseEntity *)this_00,(Vector *)&local_18,false);
        goto LAB_0070d6c4;
      }
    }
    pfVar4 = &local_24;
    iVar2 = *(int *)this_00;
    pfVar3 = &local_18;
  }
  else {
    local_24 = *(float *)(iVar2 + 0x2c);
    local_20 = *(undefined4 *)(iVar2 + 0x30);
    local_1c = *(float *)(iVar2 + 0x34) + 53.25;
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this_00);
    }
    local_18 = *(float *)(this_00 + 0x37c);
    local_14 = *(float *)(this_00 + 0x380);
    local_10 = *(float *)(this_00 + 900);
    cVar1 = CBasePlayer::IsDead(this_00);
    if ((cVar1 != '\0') || (((byte)this_00[0x1d20] & 8) != 0)) {
      iVar2 = (**(code **)(*(int *)this_00 + 0x648))(this_00);
      if (iVar2 == 6) {
        UTIL_SetOrigin((CBaseEntity *)this_00,(Vector *)&local_24,false);
        goto LAB_0070d6c4;
      }
    }
    pfVar4 = &local_18;
    iVar2 = *(int *)this_00;
    pfVar3 = &local_24;
  }
  (**(code **)(iVar2 + 0x1dc))(this_00,pfVar3,pfVar4,&vec3_origin);
LAB_0070d6c4:
  CBaseEntity::EmitSound((CBaseEntity *)this_00,"EDIT_WARP_TO_MARK",0.0,(float *)0x0);
  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)