From 5369953d6019e7e49069fe92f365b86d84e968e5 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sat, 6 Aug 2022 13:11:01 -0500 Subject: [PATCH] Fixed NPCs being unable to open doors with hardware not defined in the QC --- sp/src/game/server/props.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sp/src/game/server/props.cpp b/sp/src/game/server/props.cpp index c643dd68..78675b7a 100644 --- a/sp/src/game/server/props.cpp +++ b/sp/src/game/server/props.cpp @@ -4478,6 +4478,13 @@ void CBasePropDoor::CalcDoorSounds() #endif } +#ifdef MAPBASE + // This would still be -1 if the hardware wasn't valid + if (m_flNPCOpenDistance == -1) + m_flNPCOpenDistance = ai_door_enable_acts.GetBool() ? 32.0 : 64.0; +#endif + + // If any sounds were missing, try the "defaults" block. if ( ( strSoundOpen == NULL_STRING ) || ( strSoundClose == NULL_STRING ) || ( strSoundMoving == NULL_STRING ) || ( strSoundLocked == NULL_STRING ) || ( strSoundUnlocked == NULL_STRING ) )