mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Add startrings level header option
This commit is contained in:
parent
e20949ef77
commit
7a23b19be8
3 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue