L L4D2node

CCollisionEvent::EndTouch

0x00779900 · 455 bytes · __thiscall

_ZN15CCollisionEvent8EndTouchEP14IPhysicsObjectS1_P21IPhysicsCollisionData

Decompiled

undefined (4 params)

/* CCollisionEvent::EndTouch(IPhysicsObject*, IPhysicsObject*, IPhysicsCollisionData*) */

void __thiscall
CCollisionEvent::EndTouch
          (CCollisionEvent *this,IPhysicsObject *param_1,IPhysicsObject *param_2,
          IPhysicsCollisionData *param_3)

{
  char cVar1;
  CBaseEntity *pCVar2;
  CBaseEntity *pCVar3;
  Vector *pVVar4;
  int *piVar5;
  int *piVar6;
  CBaseEntity *pCVar7;
  int iVar8;
  Vector *in_stack_ffffefb8;
  int local_1044;
  Vector *local_1040;
  undefined1 local_1034 [12];
  undefined1 local_1028 [12];
  undefined4 local_101c [1027];
  
  *(int *)(this + 0x15c) = *(int *)(this + 0x15c) + 1;
                    /* try { // try from 00779921 to 00779acb has its CatchHandler @ 00779ad1 */
  pCVar2 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0x48))(param_1);
  pCVar3 = (CBaseEntity *)(**(code **)(*(int *)param_2 + 0x48))(param_2);
  if ((pCVar3 != (CBaseEntity *)0x0) && (pCVar2 != (CBaseEntity *)0x0)) {
    pVVar4 = (Vector *)(**(code **)(*(int *)pCVar2 + 0x2b8))(pCVar2,local_101c,0x400);
    local_1040 = (Vector *)0x0;
    local_1044 = 0;
    if (0 < (int)pVVar4) {
      do {
        in_stack_ffffefb8 = (Vector *)local_101c[(int)local_1040];
        piVar5 = (int *)(**(code **)(*(int *)in_stack_ffffefb8 + 0x144))(in_stack_ffffefb8);
        iVar8 = 0;
        while (cVar1 = (**(code **)(*piVar5 + 8))(piVar5), cVar1 != '\0') {
          piVar6 = (int *)(**(code **)(*piVar5 + 0xc))(piVar5,1);
          pCVar7 = (CBaseEntity *)(**(code **)(*piVar6 + 0x48))(piVar6);
          iVar8 = iVar8 + (uint)(pCVar3 == pCVar7);
          (**(code **)(*piVar5 + 0x34))(piVar5);
        }
        (**(code **)(*(int *)in_stack_ffffefb8 + 0x148))(in_stack_ffffefb8,piVar5);
        local_1044 = local_1044 + iVar8;
        if (1 < local_1044) goto LAB_00779938;
        local_1040 = local_1040 + 1;
      } while (local_1040 != pVVar4);
    }
    (**(code **)(*(int *)param_3 + 4))(param_3,local_1034);
    (*(code *)**(undefined4 **)param_3)(param_3,local_1028);
    if (this[0x164] == (CCollisionEvent)0x0) {
      CBaseEntity::PhysicsNotifyOtherOfUntouch(pCVar2,pCVar3);
      CBaseEntity::PhysicsNotifyOtherOfUntouch(pCVar3,pCVar2);
    }
    else {
      AddTouchEvent((CCollisionEvent *)0x1,(CBaseEntity *)&vec3_origin,(CBaseEntity *)&vec3_origin,
                    (int)pCVar2,pVVar4,in_stack_ffffefb8);
    }
  }
LAB_00779938:
  *(int *)(this + 0x15c) = *(int *)(this + 0x15c) + -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)