Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
infinite loop if door triggers itself when opened/closed
  • Loading branch information
wootguy committed Dec 3, 2024
1 parent 1448064 commit bea1600
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dlls/func/CBaseDoor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,10 @@ int CBaseDoor::DoorActivate(USE_TYPE useType)

if (FBitSet(pev->spawnflags, SF_DOOR_NO_AUTO_RETURN) && shouldClose)
{// door should close
DoorGoDown();
if (m_toggle_state != TS_AT_BOTTOM)
DoorGoDown();
}
else
else if (m_toggle_state != TS_AT_TOP)
{// door should open

if (m_hActivator != NULL && m_hActivator->IsPlayer())
Expand Down

0 comments on commit bea1600

Please sign in to comment.