player->oldscale var for pre-Nightserize scale
This commit is contained in:
parent
8154578fb6
commit
480c4f890d
|
@ -457,6 +457,7 @@ typedef struct player_s
|
||||||
mobj_t *capsule; // Go inside the capsule
|
mobj_t *capsule; // Go inside the capsule
|
||||||
mobj_t *drone; // Move center to the drone
|
mobj_t *drone; // Move center to the drone
|
||||||
UINT8 mare; // Current mare
|
UINT8 mare; // Current mare
|
||||||
|
fixed_t oldscale; // Pre-Nightserize scale
|
||||||
|
|
||||||
// Statistical purposes.
|
// Statistical purposes.
|
||||||
tic_t marebegunat; // Leveltime when mare begun
|
tic_t marebegunat; // Leveltime when mare begun
|
||||||
|
|
|
@ -292,6 +292,8 @@ static int player_get(lua_State *L)
|
||||||
LUA_PushUserdata(L, plr->drone, META_MOBJ);
|
LUA_PushUserdata(L, plr->drone, META_MOBJ);
|
||||||
else if (fastcmp(field,"mare"))
|
else if (fastcmp(field,"mare"))
|
||||||
lua_pushinteger(L, plr->mare);
|
lua_pushinteger(L, plr->mare);
|
||||||
|
else if (fastcmp(field,"oldscale"))
|
||||||
|
lua_pushfixed(L, plr->oldscale);
|
||||||
else if (fastcmp(field,"marebegunat"))
|
else if (fastcmp(field,"marebegunat"))
|
||||||
lua_pushinteger(L, plr->marebegunat);
|
lua_pushinteger(L, plr->marebegunat);
|
||||||
else if (fastcmp(field,"startedtime"))
|
else if (fastcmp(field,"startedtime"))
|
||||||
|
@ -579,6 +581,8 @@ static int player_set(lua_State *L)
|
||||||
}
|
}
|
||||||
else if (fastcmp(field,"mare"))
|
else if (fastcmp(field,"mare"))
|
||||||
plr->mare = (UINT8)luaL_checkinteger(L, 3);
|
plr->mare = (UINT8)luaL_checkinteger(L, 3);
|
||||||
|
else if (fastcmp(field,"oldscale"))
|
||||||
|
plr->oldscale = luaL_checkfixed(L, 3);
|
||||||
else if (fastcmp(field,"marebegunat"))
|
else if (fastcmp(field,"marebegunat"))
|
||||||
plr->marebegunat = (tic_t)luaL_checkinteger(L, 3);
|
plr->marebegunat = (tic_t)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"startedtime"))
|
else if (fastcmp(field,"startedtime"))
|
||||||
|
|
|
@ -199,6 +199,7 @@ static void P_NetArchivePlayers(void)
|
||||||
WRITEUINT8(save_p, players[i].drilldelay);
|
WRITEUINT8(save_p, players[i].drilldelay);
|
||||||
WRITEUINT8(save_p, players[i].bonustime);
|
WRITEUINT8(save_p, players[i].bonustime);
|
||||||
WRITEUINT8(save_p, players[i].mare);
|
WRITEUINT8(save_p, players[i].mare);
|
||||||
|
WRITEFIXED(save_p, players[i].oldscale);
|
||||||
|
|
||||||
WRITEUINT32(save_p, players[i].marebegunat);
|
WRITEUINT32(save_p, players[i].marebegunat);
|
||||||
WRITEUINT32(save_p, players[i].startedtime);
|
WRITEUINT32(save_p, players[i].startedtime);
|
||||||
|
@ -394,6 +395,7 @@ static void P_NetUnArchivePlayers(void)
|
||||||
players[i].drilldelay = READUINT8(save_p);
|
players[i].drilldelay = READUINT8(save_p);
|
||||||
players[i].bonustime = (boolean)READUINT8(save_p);
|
players[i].bonustime = (boolean)READUINT8(save_p);
|
||||||
players[i].mare = READUINT8(save_p);
|
players[i].mare = READUINT8(save_p);
|
||||||
|
players[i].oldscale = READFIXED(save_p);
|
||||||
|
|
||||||
players[i].marebegunat = READUINT32(save_p);
|
players[i].marebegunat = READUINT32(save_p);
|
||||||
players[i].startedtime = READUINT32(save_p);
|
players[i].startedtime = READUINT32(save_p);
|
||||||
|
|
|
@ -2385,8 +2385,8 @@ static void P_LevelInitStuff(void)
|
||||||
players[i].texttimer = players[i].linkcount =\
|
players[i].texttimer = players[i].linkcount =\
|
||||||
players[i].linktimer = players[i].flyangle =\
|
players[i].linktimer = players[i].flyangle =\
|
||||||
players[i].anotherflyangle = players[i].nightstime =\
|
players[i].anotherflyangle = players[i].nightstime =\
|
||||||
players[i].mare = players[i].realtime =\
|
players[i].mare = players[i].oldscale =\
|
||||||
players[i].exiting = 0;
|
players[i].realtime = players[i].exiting = 0;
|
||||||
|
|
||||||
// i guess this could be part of the above but i feel mildly uncomfortable implicitly casting
|
// i guess this could be part of the above but i feel mildly uncomfortable implicitly casting
|
||||||
players[i].gotcontinue = false;
|
players[i].gotcontinue = false;
|
||||||
|
|
Loading…
Reference in New Issue