mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-12 13:52:05 +00:00
Merge branch 'nightsplus-laplogic' into nights-score-lap
This commit is contained in:
commit
30fa526f6f
5 changed files with 18 additions and 1 deletions
|
@ -473,6 +473,8 @@ typedef struct player_s
|
|||
UINT8 lastmare; // previous mare
|
||||
UINT8 lastmarelap; // previous mare lap
|
||||
UINT8 lastmarebonuslap; // previous mare bonus lap
|
||||
UINT8 totalmarelap; // total mare lap
|
||||
UINT8 totalmarebonuslap; // total mare bonus lap
|
||||
INT32 maxlink; // maximum link obtained
|
||||
UINT8 texttimer; // nights_texttime should not be local
|
||||
UINT8 textvar; // which line of NiGHTS text to show -- let's not use cheap hacks
|
||||
|
|
|
@ -320,6 +320,10 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->lastmarelap);
|
||||
else if (fastcmp(field,"lastmarebonuslap"))
|
||||
lua_pushinteger(L, plr->lastmarebonuslap);
|
||||
else if (fastcmp(field,"totalmarelap"))
|
||||
lua_pushinteger(L, plr->totalmarelap);
|
||||
else if (fastcmp(field,"totalmarebonuslap"))
|
||||
lua_pushinteger(L, plr->totalmarebonuslap);
|
||||
else if (fastcmp(field,"maxlink"))
|
||||
lua_pushinteger(L, plr->maxlink);
|
||||
else if (fastcmp(field,"texttimer"))
|
||||
|
@ -614,6 +618,10 @@ static int player_set(lua_State *L)
|
|||
plr->lastmarelap = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"lastmarebonuslap"))
|
||||
plr->lastmarebonuslap = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"totalmarelap"))
|
||||
plr->totalmarelap = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"totalmarebonuslap"))
|
||||
plr->totalmarebonuslap = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"maxlink"))
|
||||
plr->maxlink = (INT32)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"texttimer"))
|
||||
|
|
|
@ -1114,12 +1114,14 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
))
|
||||
{
|
||||
pl->marelap++;
|
||||
pl->totalmarelap++;
|
||||
pl->lapbegunat = leveltime;
|
||||
pl->lapstartedtime = pl->nightstime;
|
||||
|
||||
if (pl->bonustime)
|
||||
if (pl->bonustime)
|
||||
{
|
||||
pl->marebonuslap++;
|
||||
pl->totalmarebonuslap++;
|
||||
|
||||
// Respawn rings and items
|
||||
P_ReloadRings();
|
||||
|
|
|
@ -214,6 +214,8 @@ static void P_NetArchivePlayers(void)
|
|||
WRITEUINT8(save_p, players[i].lastmare);
|
||||
WRITEUINT8(save_p, players[i].lastmarelap);
|
||||
WRITEUINT8(save_p, players[i].lastmarebonuslap);
|
||||
WRITEUINT8(save_p, players[i].totalmarelap);
|
||||
WRITEUINT8(save_p, players[i].totalmarebonuslap);
|
||||
WRITEINT32(save_p, players[i].maxlink);
|
||||
WRITEUINT8(save_p, players[i].texttimer);
|
||||
WRITEUINT8(save_p, players[i].textvar);
|
||||
|
@ -410,6 +412,8 @@ static void P_NetUnArchivePlayers(void)
|
|||
players[i].lastmare = READUINT8(save_p);
|
||||
players[i].lastmarelap = READUINT8(save_p);
|
||||
players[i].lastmarebonuslap = READUINT8(save_p);
|
||||
players[i].totalmarelap = READUINT8(save_p);
|
||||
players[i].totalmarebonuslap = READUINT8(save_p);
|
||||
players[i].maxlink = READINT32(save_p);
|
||||
players[i].texttimer = READUINT8(save_p);
|
||||
players[i].textvar = READUINT8(save_p);
|
||||
|
|
|
@ -2382,6 +2382,7 @@ static void P_LevelInitStuff(void)
|
|||
players[i].finishedtime = players[i].finishedspheres =\
|
||||
players[i].finishedrings = players[i].lastmare =\
|
||||
players[i].lastmarelap = players[i].lastmarebonuslap =\
|
||||
players[i].totalmarelap = players[i].totalmarebonuslap =\
|
||||
players[i].marebegunat = players[i].textvar =\
|
||||
players[i].texttimer = players[i].linkcount =\
|
||||
players[i].linktimer = players[i].flyangle =\
|
||||
|
|
Loading…
Reference in a new issue