Add startrings level header option
This commit is contained in:
parent
e20949ef77
commit
7a23b19be8
|
@ -1323,6 +1323,8 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
||||||
else
|
else
|
||||||
mapheaderinfo[num-1]->menuflags &= ~LF2_WIDEICON;
|
mapheaderinfo[num-1]->menuflags &= ~LF2_WIDEICON;
|
||||||
}
|
}
|
||||||
|
else if (fastcmp(word, "STARTRINGS"))
|
||||||
|
mapheaderinfo[num-1]->startrings = (UINT16)i;
|
||||||
else
|
else
|
||||||
deh_warning("Level header %d: unknown word '%s'", num, word);
|
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
|
UINT8 menuflags; ///< LF2_flags: options that affect record attack / nights mode menus
|
||||||
|
|
||||||
char selectheading[22]; ///< Level select heading. Allows for controllable grouping.
|
char selectheading[22]; ///< Level select heading. Allows for controllable grouping.
|
||||||
|
UINT16 startrings; ///< Number of rings players start with.
|
||||||
|
|
||||||
// Freed animals stuff.
|
// Freed animals stuff.
|
||||||
UINT8 numFlickies; ///< Internal. For freed flicky support.
|
UINT8 numFlickies; ///< Internal. For freed flicky support.
|
||||||
|
|
|
@ -2449,6 +2449,8 @@ void G_SpawnPlayer(INT32 playernum, boolean starpost)
|
||||||
}
|
}
|
||||||
P_MovePlayerToSpawn(playernum, spawnpoint);
|
P_MovePlayerToSpawn(playernum, spawnpoint);
|
||||||
|
|
||||||
|
players[playernum].rings = mapheaderinfo[gamemap-1]->startrings;
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
LUAh_PlayerSpawn(&players[playernum]); // Lua hook for player spawning :)
|
LUAh_PlayerSpawn(&players[playernum]); // Lua hook for player spawning :)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue