summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2006-03-16 21:46:59 +0000
committerSimon Howard2006-03-16 21:46:59 +0000
commit3b8e76e7363712827be27729a79b0d3139a2ff97 (patch)
tree10851fc38bf638b6b518a93677cf4d783fe22e04 /src
parentf306694f46938ef70804d5709feccac36c302e77 (diff)
downloadchocolate-doom-3b8e76e7363712827be27729a79b0d3139a2ff97.tar.gz
chocolate-doom-3b8e76e7363712827be27729a79b0d3139a2ff97.tar.bz2
chocolate-doom-3b8e76e7363712827be27729a79b0d3139a2ff97.zip
Fix crasher when starting new levels, because the intermissions code
tries to draw patches which have been unloaded (WI_Drawer runs after WI_End, because it is waiting for the game loop to load the new level) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 421
Diffstat (limited to 'src')
-rw-r--r--src/wi_stuff.c15
-rw-r--r--src/wi_stuff.h6
2 files changed, 16 insertions, 5 deletions
diff --git a/src/wi_stuff.c b/src/wi_stuff.c
index da51d3e3..41e6e193 100644
--- a/src/wi_stuff.c
+++ b/src/wi_stuff.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: wi_stuff.c 352 2006-01-28 20:03:09Z fraggle $
+// $Id: wi_stuff.c 421 2006-03-16 21:46:59Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -44,7 +44,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: wi_stuff.c 352 2006-01-28 20:03:09Z fraggle $";
+rcsid[] = "$Id: wi_stuff.c 421 2006-03-16 21:46:59Z fraggle $";
#include <stdio.h>
@@ -748,6 +748,11 @@ void WI_End(void)
{
void WI_unloadData(void);
WI_unloadData();
+
+ // Set state to finished. This prevents trying to draw the screen
+ // again using any of the patches we have now unloaded.
+
+ state = FinishedIntermission;
}
void WI_initNoState(void)
@@ -1554,6 +1559,9 @@ void WI_Ticker(void)
case NoState:
WI_updateNoState();
break;
+
+ case FinishedIntermission:
+ break;
}
}
@@ -1814,6 +1822,9 @@ void WI_Drawer (void)
case NoState:
WI_drawNoState();
break;
+
+ case FinishedIntermission:
+ break;
}
}
diff --git a/src/wi_stuff.h b/src/wi_stuff.h
index 948bc20b..da14002f 100644
--- a/src/wi_stuff.h
+++ b/src/wi_stuff.h
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: wi_stuff.h 8 2005-07-23 16:44:57Z fraggle $
+// $Id: wi_stuff.h 421 2006-03-16 21:46:59Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -39,8 +39,8 @@ typedef enum
{
NoState = -1,
StatCount,
- ShowNextLoc
-
+ ShowNextLoc,
+ FinishedIntermission,
} stateenum_t;
// Called by main loop, animate the intermission.