Skip to content

Commit

Permalink
Don't shutdown the map on (specific) SP missions, it still is in use …
Browse files Browse the repository at this point in the history
…for away missions when we come back.

If said map is shutdown, then instead of crashing, this just makes it so you don't see textures.
Note for the future: Perhaps it is better to just abort out instead, since it means that we
shutdown the map when we were not supposed to...

fixes ticket:2265
fixes ticket:2256
  • Loading branch information
buginator committed Oct 27, 2010
1 parent 0ca897a commit f340607
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mission.c
Expand Up @@ -870,8 +870,12 @@ void restoreMissionData(void)
freeAllStructs();
freeAllFeatures();
gwShutDown();
mapShutdown();

if (game.type != CAMPAIGN)
{
// we don't want this to happen on missions
ASSERT(false, "mapShutDown() is being called");
mapShutdown();
}
//restore the game pointers
for (inc = 0; inc < MAX_PLAYERS; inc++)
{
Expand Down
2 changes: 2 additions & 0 deletions src/terrain.c
Expand Up @@ -1264,6 +1264,8 @@ void drawTerrain(void)

glBindBuffer(GL_ARRAY_BUFFER, textureVBO);

ASSERT_OR_RETURN( , psGroundTypes, "Ground type was not set, no textures will be seen.");

// draw each layer separately
for (layer = 0; layer < numGroundTypes; layer++)
{
Expand Down

0 comments on commit f340607

Please sign in to comment.