Add startrings level header option

This commit is contained in:
Steel Titanium 2019-06-23 18:15:40 -04:00
parent e20949ef77
commit 7a23b19be8
3 changed files with 5 additions and 0 deletions

View File

@ -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);
}

View File

@ -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.

View File

@ -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