summaryrefslogtreecommitdiff
path: root/src/hexen/sb_bar.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/sb_bar.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/sb_bar.c')
-rw-r--r--src/hexen/sb_bar.c5
1 files changed, 3 insertions, 2 deletions
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;