Skip to content

Commit b859c3d

Browse files
committed
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
1 parent 94bedce commit b859c3d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: src/mission.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -871,9 +871,8 @@ void restoreMissionData(void)
871871
gwShutDown();
872872
if (game.type != CAMPAIGN)
873873
{
874-
// we don't want this to happen on missions
875-
ASSERT(false, "mapShutDown() is being called");
876-
mapShutdown();
874+
ASSERT(false, "game type isn't campaign, but we are in a campaign game!");
875+
game.type = CAMPAIGN; // fix the issue, since it is obviously a bug
877876
}
878877
//restore the game pointers
879878
for (inc = 0; inc < MAX_PLAYERS; inc++)
@@ -946,9 +945,6 @@ void restoreMissionData(void)
946945

947946
resetRadarRedraw();
948947

949-
// reset the environ map back to the homebase settings
950-
environReset();
951-
952948
//intSetMapPos(mission.playerX, mission.playerY);
953949
}
954950

0 commit comments

Comments
 (0)