From bde6aa07bcd1c359e38eaf5e908886d4d8762b20 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Wed, 31 Jan 2024 15:51:44 +0700 Subject: [PATCH] Disable door asserts (Resolves #926) --- regamedll/dlls/buttons.cpp | 7 +++++++ regamedll/dlls/doors.cpp | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/regamedll/dlls/buttons.cpp b/regamedll/dlls/buttons.cpp index 8e38b369..8ad08fe7 100644 --- a/regamedll/dlls/buttons.cpp +++ b/regamedll/dlls/buttons.cpp @@ -1,5 +1,12 @@ #include "precompiled.h" +#if !defined(DOOR_ASSERT) +#undef DbgAssert +#undef DbgAssertMsg +#define DbgAssert(_exp) ((void)0) +#define DbgAssertMsg(_exp, _msg) ((void)0) +#endif + TYPEDESCRIPTION CEnvGlobal::m_SaveData[] = { DEFINE_FIELD(CEnvGlobal, m_globalstate, FIELD_STRING), diff --git a/regamedll/dlls/doors.cpp b/regamedll/dlls/doors.cpp index ada7e6a8..a6b252bc 100644 --- a/regamedll/dlls/doors.cpp +++ b/regamedll/dlls/doors.cpp @@ -1,5 +1,12 @@ #include "precompiled.h" +#if !defined(DOOR_ASSERT) +#undef DbgAssert +#undef DbgAssertMsg +#define DbgAssert(_exp) ((void)0) +#define DbgAssertMsg(_exp, _msg) ((void)0) +#endif + TYPEDESCRIPTION CBaseDoor::m_SaveData[] = { DEFINE_FIELD(CBaseDoor, m_bHealthValue, FIELD_CHARACTER), @@ -695,10 +702,7 @@ void CBaseDoor::DoorGoDown() } } -#ifdef DOOR_ASSERT DbgAssert(m_toggle_state == TS_AT_TOP); -#endif - m_toggle_state = TS_GOING_DOWN; SetMoveDone(&CBaseDoor::DoorHitBottom);