L L4D2node

CBaseDoor::Precache

0x00666320 · 759 bytes · __thiscall

_ZN9CBaseDoor8PrecacheEv

Decompiled

undefined (1 param)

/* CBaseDoor::Precache() */

void __thiscall CBaseDoor::Precache(CBaseDoor *this)

{
  char cVar1;
  char *pcVar2;
  undefined4 local_10;
  
  cVar1 = (**(code **)(*(int *)this + 0x330))(this);
  if (cVar1 == '\0') {
    UTIL_ValidateSoundName((string_t *)(this + 0x508),"DoorSound.DefaultMove");
    UTIL_ValidateSoundName((string_t *)(this + 0x50c),"DoorSound.DefaultArrive");
    UTIL_ValidateSoundName((string_t *)(this + 0x4d4),"DoorSound.DefaultLocked");
    UTIL_ValidateSoundName((string_t *)(this + 0x4dc),"DoorSound.Null");
  }
  else {
    UTIL_ValidateSoundName((string_t *)(this + 0x508),"RotDoorSound.DefaultMove");
    UTIL_ValidateSoundName((string_t *)(this + 0x50c),"RotDoorSound.DefaultArrive");
    UTIL_ValidateSoundName((string_t *)(this + 0x4d4),"RotDoorSound.DefaultLocked");
    UTIL_ValidateSoundName((string_t *)(this + 0x4dc),"DoorSound.Null");
    cVar1 = CBaseEntity::IsPrecacheAllowed();
    if (cVar1 != '\0') {
      CBaseEntity::PrecacheScriptSound("WoodenDoor.Pound");
      CBaseEntity::PrecacheScriptSound("CheckpointDoor.Pound");
    }
  }
  pcVar2 = *(char **)(this + 0x508);
  if (pcVar2 == (char *)0x0) {
    pcVar2 = "";
  }
  CBaseEntity::PrecacheScriptSound(pcVar2);
  pcVar2 = *(char **)(this + 0x50c);
  if (pcVar2 == (char *)0x0) {
    pcVar2 = "";
  }
  CBaseEntity::PrecacheScriptSound(pcVar2);
  pcVar2 = *(char **)(this + 0x510);
  if (pcVar2 == (char *)0x0) {
    pcVar2 = "";
  }
  CBaseEntity::PrecacheScriptSound(pcVar2);
  pcVar2 = *(char **)(this + 0x514);
  if (pcVar2 == (char *)0x0) {
    pcVar2 = "";
  }
  CBaseEntity::PrecacheScriptSound(pcVar2);
  pcVar2 = *(char **)(this + 0x4d4);
  if (pcVar2 == (char *)0x0) {
    pcVar2 = "";
  }
  CBaseEntity::PrecacheScriptSound(pcVar2);
  pcVar2 = "";
  if (*(char **)(this + 0x4dc) != (char *)0x0) {
    pcVar2 = *(char **)(this + 0x4dc);
  }
  CBaseEntity::PrecacheScriptSound(pcVar2);
  switch(this[0x4f8]) {
  default:
    *(undefined4 *)(this + 0x4d8) = 0;
    goto LAB_006664dc;
  case (CBaseDoor)0x1:
    break;
  case (CBaseDoor)0x2:
    break;
  case (CBaseDoor)0x3:
    break;
  case (CBaseDoor)0x4:
    break;
  case (CBaseDoor)0x5:
    break;
  case (CBaseDoor)0x6:
    break;
  case (CBaseDoor)0x7:
    break;
  case (CBaseDoor)0x8:
    break;
  case (CBaseDoor)0x9:
  }
  AllocPooledString((char *)&local_10);
  *(undefined4 *)(this + 0x4d8) = local_10;
LAB_006664dc:
  switch(this[0x4f9]) {
  default:
    *(undefined4 *)(this + 0x4e0) = 0;
    return;
  case (CBaseDoor)0x1:
    break;
  case (CBaseDoor)0x2:
    break;
  case (CBaseDoor)0x3:
    break;
  case (CBaseDoor)0x4:
    break;
  case (CBaseDoor)0x5:
    break;
  case (CBaseDoor)0x6:
    break;
  case (CBaseDoor)0x7:
    break;
  case (CBaseDoor)0x8:
  }
  AllocPooledString((char *)&local_10);
  *(undefined4 *)(this + 0x4e0) = local_10;
  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)