1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Fix the last win screen with private missions

It returns to the main screen when the last mission is finished.

It fixes issue #56.
This commit is contained in:
Mathieu Schroeter 2018-03-16 11:46:31 +01:00
parent 537c077146
commit ef362c8b37

View File

@ -3450,9 +3450,10 @@ CEvent::ChangePhase (Uint32 phase)
m_phaseAfterMovie = EV_PHASE_WIN;
if (
!m_bPrivate &&
m_pDecor->FileExist (GetPhysicalWorld (), false, world, time, total) &&
!m_pDecor->FileExist (GetPhysicalWorld () + 1, false, world, time, total))
(m_bPrivate && GetPhysicalWorld () - 200 == MAX_PRIVATE_MISSIONS - 1) ||
(m_pDecor->FileExist (GetPhysicalWorld (), false, world, time, total) &&
!m_pDecor->FileExist (
GetPhysicalWorld () + 1, false, world, time, total)))
m_phaseAfterMovie = EV_PHASE_LASTWIN;
}