From 3a140fe3b5bf1775276a0a454c52b6974b68055f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 10 May 2015 18:48:05 -0400 Subject: Add back the Doom PWAD reload hack. This was removed back in d190b596c566394717324296cbf6b46e67c64f5c; at the time I didn't understand what it was or how it was supposed to be used - it seemed like cruft left over from Doom's development. It is actually a potentially useful feature for level authors when developing their maps. See here: http://doomwiki.org/wiki/Reload_hack The reload hack is a relatively obscure feature of limited usefulness nowadays, but nonetheless a technical curiosity that ought to be preserved in Chocolate Doom. The reimplementation here is a lot cleaner than the original version from the source release: W_Reload() is based on a call to W_AddFile(), we don't reopen the reload file every time we want to read a lump, and we include a check in W_AddFile() that we are not trying to use the hack on more than one PWAD file. This fixes #539. --- src/doom/p_setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/doom') diff --git a/src/doom/p_setup.c b/src/doom/p_setup.c index 00306e84..08fed7aa 100644 --- a/src/doom/p_setup.c +++ b/src/doom/p_setup.c @@ -770,7 +770,10 @@ P_SetupLevel // UNUSED W_Profile (); P_InitThinkers (); - + + // if working with a devlopment map, reload it + W_Reload (); + // find map name if ( gamemode == commercial) { -- cgit v1.2.3