L L4D2node

CC_Ent_Orient

0x0060eca0 · 227 bytes · __cdecl

_Z13CC_Ent_OrientRK8CCommand

Decompiled

undefined (1 param)

/* CC_Ent_Orient(CCommand const&) */

void CC_Ent_Orient(CCommand *param_1)

{
  CBaseEntity *pCVar1;
  char cVar2;
  int iVar3;
  CBaseEntity *local_28;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  if (*(int *)param_1 < 2) {
    Msg("Format: ent_orient <entity name> <optional: allangles>\n");
    return;
  }
  cVar2 = CC_GetCommandEnt(param_1,&local_28,(Vector *)0x0,(QAngle *)&local_24);
  pCVar1 = local_28;
  if (cVar2 != '\0') {
    if (((byte)local_28[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(local_28);
    }
    local_18 = *(undefined4 *)(pCVar1 + 0x37c);
    local_14 = *(undefined4 *)(pCVar1 + 0x380);
    local_10 = *(undefined4 *)(pCVar1 + 900);
    if ((*(int *)param_1 == 3) &&
       (iVar3 = V_strncmp(*(char **)(param_1 + 0x410),"allangles",9), iVar3 == 0)) {
      local_18 = local_24;
      local_14 = local_20;
      local_10 = local_1c;
    }
    else {
      local_14 = local_20;
    }
    CBaseEntity::SetAbsAngles(local_28,(QAngle *)&local_18);
    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)