L L4D2node

SurvivorCheckpointLeaving::OnContact

0x0090a0b0 · 585 bytes · __thiscall

_ZN25SurvivorCheckpointLeaving9OnContactEP11SurvivorBotP11CBaseEntityP10CGameTrace

Decompiled

undefined (4 params)

/* SurvivorCheckpointLeaving::OnContact(SurvivorBot*, CBaseEntity*, CGameTrace*) */

SurvivorCheckpointLeaving * __thiscall
SurvivorCheckpointLeaving::OnContact
          (SurvivorCheckpointLeaving *this,SurvivorBot *param_1,CBaseEntity *param_2,
          CGameTrace *param_3)

{
  float fVar1;
  char cVar2;
  int *piVar3;
  int iVar4;
  longdouble lVar5;
  
  if (param_3 == (CGameTrace *)0x0) goto LAB_0090a156;
  piVar3 = (int *)__dynamic_cast(param_3,&CBaseEntity::typeinfo,&CBasePropDoor::typeinfo,0);
  if (piVar3 == (int *)0x0) {
    iVar4 = __dynamic_cast(param_3,&CBaseEntity::typeinfo,&CBaseDoor::typeinfo,0);
    if (iVar4 != 0) {
      *(undefined4 *)(param_1 + 0x4c) = 0;
      lVar5 = (longdouble)RandomFloat(0x3f800000,0x40400000);
      fVar1 = (float)lVar5;
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + fVar1 != *(float *)(param_1 + 0x3c)) {
        (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x3c);
        *(float *)(param_1 + 0x3c) = (float)lVar5 + fVar1;
      }
      if (fVar1 != *(float *)(param_1 + 0x38)) {
        (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x38);
        *(float *)(param_1 + 0x38) = fVar1;
      }
    }
    goto LAB_0090a156;
  }
  *(undefined4 *)(param_1 + 0x4c) = 0;
  lVar5 = (longdouble)RandomFloat(0x3f800000,0x40400000);
  fVar1 = (float)lVar5;
  lVar5 = (longdouble)CountdownTimer::Now();
  if ((float)lVar5 + fVar1 == *(float *)(param_1 + 0x3c)) {
    if (fVar1 == *(float *)(param_1 + 0x38)) goto LAB_0090a143;
LAB_0090a198:
    (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x38);
    *(float *)(param_1 + 0x38) = fVar1;
    cVar2 = (**(code **)(*piVar3 + 0x47c))(piVar3);
  }
  else {
    (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x3c);
    *(float *)(param_1 + 0x3c) = (float)lVar5 + fVar1;
    if (fVar1 != *(float *)(param_1 + 0x38)) goto LAB_0090a198;
LAB_0090a143:
    cVar2 = (**(code **)(*piVar3 + 0x47c))(piVar3);
  }
  if (cVar2 != '\0') {
    piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x9a0))(param_2);
    (**(code **)(*piVar3 + 0x170))(piVar3,&DAT_00d539c2);
  }
LAB_0090a156:
  cVar2 = CDirector::IsAllBotSurvivorTeam();
  if (cVar2 != '\0') {
    *(undefined4 *)this = 0;
    *(undefined4 *)(this + 4) = 0;
    *(undefined4 *)(this + 8) = 0;
    *(undefined4 *)(this + 0xc) = 1;
    return this;
  }
  *(undefined4 *)this = 4;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(this + 0xc) = 3;
  return this;
}

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)