L L4D2node

CDirector::ResetResponseRulesOnRoundStart

0x00873f80 · 237 bytes · __cdecl

_ZN9CDirector30ResetResponseRulesOnRoundStartEv

Decompiled

undefined (0 params)

/* CDirector::ResetResponseRulesOnRoundStart() */

void CDirector::ResetResponseRulesOnRoundStart(void)

{
  byte *pbVar1;
  int *piVar2;
  uint uVar3;
  int *piVar4;
  ushort uVar5;
  int iVar6;
  CBaseEntity *pCVar7;
  
  pbVar1 = *(byte **)(gpGlobals + 0x58);
  if ((((pbVar1 != (byte *)0x0) && ((*pbVar1 & 2) == 0)) &&
      (piVar2 = *(int **)(pbVar1 + 0xc), piVar2 != (int *)0x0)) &&
     (pCVar7 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2), pCVar7 != (CBaseEntity *)0x0))
  {
    CBaseEntity::ClearAllContexts(pCVar7);
  }
  pCVar7 = (CBaseEntity *)0x0;
  while (pCVar7 = (CBaseEntity *)
                  CGlobalEntityList::FindEntityByClassname
                            ((CGlobalEntityList *)gEntList,pCVar7,"func_orator"),
        pCVar7 != (CBaseEntity *)0x0) {
    CBaseEntity::ClearAllContexts(pCVar7);
  }
  piVar2 = (int *)CInfoRemarkable::GetListOfAllThatIsRemarkable();
  uVar5 = *(ushort *)(piVar2 + 3);
  uVar3 = (uint)uVar5;
  if (((int)uVar3 < piVar2[1]) && (uVar5 <= *(ushort *)((int)piVar2 + 0x16))) {
    iVar6 = *piVar2;
    while( true ) {
      piVar4 = (int *)(iVar6 + uVar3 * 8);
      if ((uVar5 == *(ushort *)(piVar4 + 1)) && (uVar5 != *(ushort *)((int)piVar4 + 6))) break;
      if (*piVar4 != 0) {
        *(undefined4 *)(*piVar4 + 0x440) = 0;
        iVar6 = *piVar2;
        piVar4 = (int *)(uVar3 * 8 + iVar6);
      }
      uVar5 = *(ushort *)((int)piVar4 + 6);
      uVar3 = (uint)uVar5;
      if ((piVar2[1] <= (int)uVar3) || (*(ushort *)((int)piVar2 + 0x16) < uVar5)) break;
    }
  }
  TerrorResetNoRepeatResponses();
  CResponseQueue::Evacuate((CResponseQueue *)g_ResponseQueueManager._12_4_);
  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)