L L4D2node

CFlexCycler::GenericCyclerSpawn

0x00626f00 · 424 bytes · __cdecl

_ZN11CFlexCycler18GenericCyclerSpawnEPc6VectorS1_

Decompiled

undefined (3 params)

/* CFlexCycler::GenericCyclerSpawn(char*, Vector, Vector) */

void CFlexCycler::GenericCyclerSpawn(CBaseEntity *param_1,char *param_2)

{
  int iVar1;
  CStudioHdr *pCVar2;
  CStudioHdr *pCVar3;
  double dVar4;
  double dVar5;
  Vector local_28 [24];
  
  if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
    CBaseEntity::PrecacheModel(param_2);
    (**(code **)(*(int *)param_1 + 0x70))(param_1,param_2);
    Spawn((CFlexCycler *)param_1);
    UTIL_SetSize(param_1,(Vector *)&stack0x0000000c,(Vector *)&stack0x00000018);
    pCVar2 = *(CStudioHdr **)(param_1 + 0x13e0);
    if (pCVar2 == (CStudioHdr *)0x0) {
      iVar1 = CBaseEntity::GetModel(param_1);
      if (iVar1 == 0) {
        pCVar2 = *(CStudioHdr **)(param_1 + 0x13e0);
      }
      else {
        CBaseAnimating::LockStudioHdr((CBaseAnimating *)param_1);
        pCVar2 = *(CStudioHdr **)(param_1 + 0x13e0);
      }
      pCVar3 = (CStudioHdr *)0x0;
      if (pCVar2 == (CStudioHdr *)0x0) goto LAB_00626fc1;
    }
    pCVar3 = (CStudioHdr *)0x0;
    if (*(int *)pCVar2 != 0) {
      pCVar3 = pCVar2;
    }
LAB_00626fc1:
    GetEyePosition(pCVar3,local_28);
    (**(code **)(*(int *)param_1 + 0x254))(param_1,local_28);
    (**(code **)(*(int *)param_1 + 0x374))(param_1);
    iVar1 = CBaseAnimating::GetNumFlexControllers((CBaseAnimating *)param_1);
    if (4 < iVar1) {
      return;
    }
    Warning("cycler_flex used on model %s without enough flexes.\n",param_2);
    return;
  }
  if (((byte)param_1[0x14d] & 8) == 0) {
    dVar5 = (double)*(float *)(param_1 + 0x2e8);
  }
  else {
    CBaseEntity::CalcAbsolutePosition(param_1);
    dVar5 = (double)*(float *)(param_1 + 0x2e8);
    if (((byte)param_1[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(param_1);
      dVar4 = (double)*(float *)(param_1 + 0x2e4);
      if (((byte)param_1[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(param_1);
      }
      goto LAB_00626f3b;
    }
  }
  dVar4 = (double)*(float *)(param_1 + 0x2e4);
LAB_00626f3b:
  Warning("cycler at %.0f %.0f %0.f missing modelname\n",(double)*(float *)(param_1 + 0x2e0),dVar4,
          dVar5);
  UTIL_Remove(param_1);
  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)