L L4D2node

CServerGameEnts::MarkEntitiesAsTouching

0x006c5310 · 274 bytes · __thiscall

_ZN15CServerGameEnts22MarkEntitiesAsTouchingEP7edict_tS1_

Decompiled

undefined (3 params)

/* CServerGameEnts::MarkEntitiesAsTouching(edict_t*, edict_t*) */

void __thiscall
CServerGameEnts::MarkEntitiesAsTouching(CServerGameEnts *this,edict_t *param_1,edict_t *param_2)

{
  CBaseEntity CVar1;
  int *piVar2;
  CBaseEntity *this_00;
  CBaseEntity *this_01;
  CGameTrace local_70 [12];
  float local_64;
  float local_60;
  float local_5c;
  
  if ((param_1 == (edict_t *)0x0) || (piVar2 = *(int **)(param_1 + 0xc), piVar2 == (int *)0x0)) {
    this_00 = (CBaseEntity *)0x0;
  }
  else {
    this_00 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2);
  }
  if ((((param_2 != (edict_t *)0x0) && (piVar2 = *(int **)(param_2 + 0xc), piVar2 != (int *)0x0)) &&
      (this_01 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2), this_01 != (CBaseEntity *)0x0
      )) && (this_00 != (CBaseEntity *)0x0)) {
    UTIL_ClearTrace(local_70);
    if (((byte)this_01[0x14d] & 8) == 0) {
      CVar1 = this_00[0x14d];
    }
    else {
      CBaseEntity::CalcAbsolutePosition(this_01);
      CVar1 = this_00[0x14d];
    }
    if (((byte)CVar1 & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    local_60 = (*(float *)(this_01 + 0x2e4) + *(float *)(this_00 + 0x2e4)) * 0.5;
    local_5c = (*(float *)(this_01 + 0x2e8) + *(float *)(this_00 + 0x2e8)) * 0.5;
    local_64 = (*(float *)(this_01 + 0x2e0) + *(float *)(this_00 + 0x2e0)) * 0.5;
    CBaseEntity::PhysicsMarkEntitiesAsTouching(this_00,this_01,local_70);
  }
  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)