Skip to content

Commit

Permalink
Never call mapShutdown() or environReset() in mid-missions, since we …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
buginator committed Nov 12, 2010
1 parent 94bedce commit b859c3d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/mission.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,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++)
Expand Down Expand Up @@ -946,9 +945,6 @@ void restoreMissionData(void)

resetRadarRedraw();

// reset the environ map back to the homebase settings
environReset();

//intSetMapPos(mission.playerX, mission.playerY);
}

Expand Down

0 comments on commit b859c3d

Please sign in to comment.