summaryrefslogtreecommitdiff
path: root/src/hexen/p_switch.c
diff options
context:
space:
mode:
authorFabian Greffrath2015-01-20 06:53:45 +0100
committerFabian Greffrath2015-01-20 06:57:46 +0100
commitad816c1bc28ab81ddb892ff878f65969bddd9764 (patch)
tree98ecf42b00d079710172b95c4fb20d2a2e044784 /src/hexen/p_switch.c
parent80bf45c902f78e3cd0212938ee176a3c6f436997 (diff)
downloadchocolate-doom-ad816c1bc28ab81ddb892ff878f65969bddd9764.tar.gz
chocolate-doom-ad816c1bc28ab81ddb892ff878f65969bddd9764.tar.bz2
chocolate-doom-ad816c1bc28ab81ddb892ff878f65969bddd9764.zip
First shot at support for the Hexen 4-level Demo
With these changes it is possible to run the game using the HEXEN.WAD IWAD from the 4-level Demo and start a new game as one of the three player classes. Known missing bits: - The game does not yet identify itself as the demo version - The cheat codes are still unchanged - Bug compatibility, see e.g. http://dengine.net/dew/index.php?title=Libhexen
Diffstat (limited to 'src/hexen/p_switch.c')
-rw-r--r--src/hexen/p_switch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hexen/p_switch.c b/src/hexen/p_switch.c
index 9d86f92a..92bd0be4 100644
--- a/src/hexen/p_switch.c
+++ b/src/hexen/p_switch.c
@@ -66,6 +66,13 @@ void P_InitSwitchList(void)
switchlist[index] = -1;
break;
}
+
+ if (R_CheckTextureNumForName(alphSwitchList[i].name1) == -1 &&
+ gamemode == shareware)
+ {
+ continue;
+ }
+
switchlist[index++] = R_TextureNumForName(alphSwitchList[i].name1);
switchlist[index++] = R_TextureNumForName(alphSwitchList[i].name2);
}