summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2010-02-08 19:15:32 +0000
committerSimon Howard2010-02-08 19:15:32 +0000
commitc09b386e1f3cb3518b22c440d6fb7c081ff3aa0b (patch)
tree9117284cb8f4a2acf3372c1d3ce186982d1659a5
parentb83a1ed02c6f22ebbced208b02bb59ff94bed941 (diff)
downloadchocolate-doom-c09b386e1f3cb3518b22c440d6fb7c081ff3aa0b.tar.gz
chocolate-doom-c09b386e1f3cb3518b22c440d6fb7c081ff3aa0b.tar.bz2
chocolate-doom-c09b386e1f3cb3518b22c440d6fb7c081ff3aa0b.zip
Only call InitializeSections() when a dehacked patch is actually loaded.
Subversion-branch: /branches/raven-branch Subversion-revision: 1863
-rw-r--r--src/deh_main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/deh_main.c b/src/deh_main.c
index 3f0a6f29..75934087 100644
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -39,6 +39,8 @@
extern deh_section_t *deh_section_types[];
extern char *deh_signatures[];
+static boolean deh_initialized = false;
+
// If true, we can do long string replacements.
boolean deh_allow_long_strings = false;
@@ -322,6 +324,12 @@ int DEH_LoadFile(char *filename)
{
deh_context_t *context;
+ if (!deh_initialized)
+ {
+ InitializeSections();
+ deh_initialized = true;
+ }
+
printf(" loading %s\n", filename);
context = DEH_OpenFile(filename);
@@ -346,8 +354,6 @@ void DEH_Init(void)
char *filename;
int p;
- InitializeSections();
-
//!
// @category mod
//