Skip to content

Commit

Permalink
Fix sector sleep or awake if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
raydienull authored Dec 12, 2023
1 parent 3fffc18 commit d2030b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/game/CSector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ void CSector::_GoSleep()
ASSERT(!pChar->IsDisconnected());
if (!fCanTick)
pChar->GoSleep();
else
if (pChar->IsSleeping())
pChar->GoAwake();
}

for (CSObjContRec* pObjRec : m_Chars_Disconnect)
Expand All @@ -193,6 +196,9 @@ void CSector::_GoSleep()
ASSERT(pChar->IsDisconnected());
if (!fCanTick)
pChar->GoSleep();
else
if (pChar->IsSleeping())
pChar->GoAwake();
}

for (CSObjContRec* pObjRec : m_Items)
Expand All @@ -201,6 +207,9 @@ void CSector::_GoSleep()
const bool fCanTick = pItem->CanTick(true);
if (!fCanTick)
pItem->GoSleep();
else
if (pItem->IsSleeping())
pItem->GoAwake();
}
}

Expand Down

0 comments on commit d2030b5

Please sign in to comment.