L L4D2node

CBaseEntity::CollisionRulesChanged

0x0040fb90 · 231 bytes · __cdecl

_ZN11CBaseEntity21CollisionRulesChangedEb

Decompiled

undefined (1 param)

/* CBaseEntity::CollisionRulesChanged(bool) */

void CBaseEntity::CollisionRulesChanged(bool param_1)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  undefined4 uVar4;
  uint uVar5;
  int iVar6;
  undefined3 in_stack_00000005;
  int local_101c [1027];
  
  piVar2 = (int *)_param_1[0x8e];
  if (piVar2 != (int *)0x0) {
    piVar2 = (int *)(**(code **)(*piVar2 + 0x15c))(piVar2);
    if (piVar2 == (int *)0x0) {
      cVar1 = PhysIsInCallback();
      if (cVar1 != '\0') {
        Warning("Changing collision rules within a callback is likely to cause crashes!\n");
      }
      iVar3 = (**(code **)(*_param_1 + 0x2b8))(_param_1,local_101c,0x400);
      if (0 < iVar3) {
        iVar6 = 0;
        do {
          piVar2 = (int *)local_101c[iVar6];
          if (piVar2 != (int *)0x0) {
            (**(code **)(*piVar2 + 0x6c))(piVar2);
          }
          iVar6 = iVar6 + 1;
        } while (iVar6 != iVar3);
      }
    }
    else if (*(char *)((int)_param_1 + 0x1bf) != '\0') {
      iVar3 = (**(code **)(_param_1[0x65] + 0x2c))(_param_1 + 0x65);
      if ((iVar3 == 0) ||
         (uVar5 = (**(code **)(_param_1[0x65] + 0x30))(_param_1 + 0x65), (uVar5 & 4) != 0)) {
        uVar4 = 4;
      }
      else {
        uVar4 = 0;
      }
      (**(code **)(*piVar2 + 0x98))(piVar2,uVar4);
      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)