L L4D2node

CBaseServerVehicle::RestorePassengerInfo

0x00b3b800 · 170 bytes · __thiscall

_ZN18CBaseServerVehicle20RestorePassengerInfoEv

Decompiled

undefined (1 param)

/* CBaseServerVehicle::RestorePassengerInfo() */

void __thiscall CBaseServerVehicle::RestorePassengerInfo(CBaseServerVehicle *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = *(int *)(this + 0x10);
  if (iVar3 != 0) {
    if (this[0x68] == (CBaseServerVehicle)0x0) {
      (**(code **)(*(int *)this + 0xf4))(this);
      this[0x68] = (CBaseServerVehicle)0x1;
      iVar3 = *(int *)(this + 0x10);
    }
    if (0 < iVar3) {
      iVar4 = 0;
      iVar3 = 0;
      do {
        iVar1 = FindRoleIndexByName(this,*(undefined4 *)(*(int *)(this + 4) + 8 + iVar3));
        if ((-1 < iVar1) && (iVar1 < *(int *)(this + 0x24))) {
          *(int *)(*(int *)(this + 4) + iVar3) = iVar1;
          iVar2 = FindSeatIndexByName(this,iVar1,*(undefined4 *)(*(int *)(this + 4) + 0xc + iVar3));
          if ((-1 < iVar2) && (iVar2 < *(int *)(*(int *)(this + 0x18) + 0x10 + iVar1 * 0x18))) {
            *(int *)(*(int *)(this + 4) + 4 + iVar3) = iVar2;
          }
        }
        iVar4 = iVar4 + 1;
        iVar3 = iVar3 + 0x14;
      } while (iVar4 < *(int *)(this + 0x10));
    }
  }
  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)