From ad816c1bc28ab81ddb892ff878f65969bddd9764 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Tue, 20 Jan 2015 06:53:45 +0100 Subject: 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 --- src/hexen/sb_bar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/hexen/sb_bar.c') diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c index bcc5b675..e75edd25 100644 --- a/src/hexen/sb_bar.c +++ b/src/hexen/sb_bar.c @@ -314,6 +314,7 @@ void SB_Init(void) void SB_SetClassData(void) { int class; + int maxplayers = (gamemode == shareware) ? 4 : MAXPLAYERS; class = PlayerClass[consoleplayer]; // original player class (not pig) PatchWEAPONSLOT = W_CacheLumpNum(W_GetNumForName("wpslot0") @@ -330,12 +331,12 @@ void SB_SetClassData(void) if (!netgame) { // single player game uses red life gem (the second gem) PatchLIFEGEM = W_CacheLumpNum(W_GetNumForName("lifegem") - + MAXPLAYERS * class + 1, PU_STATIC); + + maxplayers * class + 1, PU_STATIC); } else { PatchLIFEGEM = W_CacheLumpNum(W_GetNumForName("lifegem") - + MAXPLAYERS * class + consoleplayer, + + maxplayers * class + consoleplayer, PU_STATIC); } SB_state = -1; -- cgit v1.2.3