Never call mapShutdown() or environReset() in mid-missions, since we come back

to the main map, and that data must be valid or we get no textures, and the water
heights will be incorrect.
Also complain loudly if the mission type is wrong (should never happen!)

fixes ticket:2262
(cherry picked from commit b859c3d6997a9860662b1be8753c643fc48f2a72)
master
buginator 2010-11-11 19:57:24 -05:00
parent c1b44daf1e
commit d4588c69f3
1 changed files with 2 additions and 6 deletions

View File

@ -852,9 +852,8 @@ void restoreMissionData(void)
gwShutDown();
if (game.type != CAMPAIGN)
{
// we don't want this to happen on missions
ASSERT(false, "mapShutDown() is being called");
mapShutdown();
ASSERT(false, "game type isn't campaign, but we are in a campaign game!");
game.type = CAMPAIGN; // fix the issue, since it is obviously a bug
}
//restore the game pointers
for (inc = 0; inc < MAX_PLAYERS; inc++)
@ -916,9 +915,6 @@ void restoreMissionData(void)
resetRadarRedraw();
// reset the environ map back to the homebase settings
environReset();
//intSetMapPos(mission.playerX, mission.playerY);
}