diff --git a/src/dehacked.c b/src/dehacked.c index f70615af62b99000d96f045f41676a80b701fbdd..25954295755df33d5c5ba5502b1a1ea9ef95af1c 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1323,6 +1323,8 @@ static void readlevelheader(MYFILE *f, INT32 num) else mapheaderinfo[num-1]->menuflags &= ~LF2_WIDEICON; } + else if (fastcmp(word, "STARTRINGS")) + mapheaderinfo[num-1]->startrings = (UINT16)i; else deh_warning("Level header %d: unknown word '%s'", num, word); } diff --git a/src/doomstat.h b/src/doomstat.h index efd347dbed6f11fa5ff843ca7461ad5094b2bdd9..06dfcca0b9a9729b60248b3b87633e35e01d0a07 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -313,6 +313,7 @@ typedef struct UINT8 menuflags; ///< LF2_flags: options that affect record attack / nights mode menus char selectheading[22]; ///< Level select heading. Allows for controllable grouping. + UINT16 startrings; ///< Number of rings players start with. // Freed animals stuff. UINT8 numFlickies; ///< Internal. For freed flicky support. diff --git a/src/g_game.c b/src/g_game.c index af17b2b289fdc03d7aa18fe85f6684e5f1ba9a0c..5a11b237f29b0df3241730f6f863ac53e8b00caf 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2449,6 +2449,8 @@ void G_SpawnPlayer(INT32 playernum, boolean starpost) } P_MovePlayerToSpawn(playernum, spawnpoint); + players[playernum].rings = mapheaderinfo[gamemap-1]->startrings; + #ifdef HAVE_BLUA LUAh_PlayerSpawn(&players[playernum]); // Lua hook for player spawning :) #endif