L L4D2node

CCSGameRules::DeathNoticeForEntity

0x004331f0 · 319 bytes · __thiscall

_ZN12CCSGameRules20DeathNoticeForEntityEP20CBaseCombatCharacterRK15CTakeDamageInfo

Decompiled

undefined (3 params)

/* CCSGameRules::DeathNoticeForEntity(CBaseCombatCharacter*, CTakeDamageInfo const&) */

void __thiscall
CCSGameRules::DeathNoticeForEntity
          (CCSGameRules *this,CBaseCombatCharacter *param_1,CTakeDamageInfo *param_2)

{
  uint uVar1;
  undefined4 uVar2;
  int *piVar3;
  int iVar4;
  undefined *puVar5;
  CBaseEntity *pCVar6;
  CBaseEntity *pCVar7;
  
  pCVar7 = (CBaseEntity *)0x0;
  uVar1 = *(uint *)(param_2 + 0x30);
  if (((uVar1 != 0xffffffff) &&
      (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
    pCVar7 = *(CBaseEntity **)(puVar5 + 4);
  }
  uVar1 = *(uint *)(param_2 + 0x34);
  pCVar6 = (CBaseEntity *)0x0;
  if (((uVar1 != 0xffffffff) &&
      (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
    pCVar6 = *(CBaseEntity **)(puVar5 + 4);
  }
  uVar2 = CMultiplayRules::GetDeathScorer((CMultiplayRules *)this,pCVar6,pCVar7);
  piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))
                            (gameeventmanager,"player_death",0,&g_DeathNoticeEvent);
  if (piVar3 != (int *)0x0) {
    if (*(int *)(param_1 + 0x30) == 0) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    (**(code **)(*piVar3 + 0x30))(piVar3,"entityid",iVar4);
    (**(code **)(*(int *)this + 0x290))(this,piVar3,uVar2,param_1,param_2);
                    /* WARNING: Could not recover jumptable at 0x00433311. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*gameeventmanager + 0x20))();
    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)