* Correct V_PERPLAYER's screen-centered (no snapto flags on a given axis) behaviour.
* Fix that one comment Digiku mentioned. ;P * Make extra lives/100 ring rewards consistent between lives being relevant and lives being infinite/not present, which was a problem this branch made evident when Race ended up getting the infinite lives symbol!
This commit is contained in:
parent
3c74952522
commit
15903c6271
|
@ -3243,13 +3243,6 @@ void A_ExtraLife(mobj_t *actor)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// In shooter gametypes, give the player 100 rings instead of an extra life.
|
|
||||||
if (gametype != GT_COOP && gametype != GT_COMPETITION)
|
|
||||||
{
|
|
||||||
P_GivePlayerRings(player, 100);
|
|
||||||
P_PlayLivesJingle(player);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
P_GiveCoopLives(player, 1, true);
|
P_GiveCoopLives(player, 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
44
src/p_user.c
44
src/p_user.c
|
@ -909,8 +909,12 @@ void P_ResetPlayer(player_t *player)
|
||||||
// Gives rings to the player, and does any special things required.
|
// Gives rings to the player, and does any special things required.
|
||||||
// Call this function when you want to increment the player's health.
|
// Call this function when you want to increment the player's health.
|
||||||
//
|
//
|
||||||
|
|
||||||
void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
||||||
{
|
{
|
||||||
|
if (!player)
|
||||||
|
return;
|
||||||
|
|
||||||
if (player->bot)
|
if (player->bot)
|
||||||
player = &players[consoleplayer];
|
player = &players[consoleplayer];
|
||||||
|
|
||||||
|
@ -929,7 +933,7 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
||||||
player->rings = 0;
|
player->rings = 0;
|
||||||
|
|
||||||
// Now extra life bonuses are handled here instead of in P_MovePlayer, since why not?
|
// Now extra life bonuses are handled here instead of in P_MovePlayer, since why not?
|
||||||
if (!ultimatemode && !modeattacking && !G_IsSpecialStage(gamemap) && G_GametypeUsesLives())
|
if (!ultimatemode && !modeattacking && !G_IsSpecialStage(gamemap) && G_GametypeUsesLives() && player->lives != 0x7f)
|
||||||
{
|
{
|
||||||
INT32 gainlives = 0;
|
INT32 gainlives = 0;
|
||||||
|
|
||||||
|
@ -941,7 +945,12 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
||||||
|
|
||||||
if (gainlives)
|
if (gainlives)
|
||||||
{
|
{
|
||||||
P_GivePlayerLives(player, gainlives);
|
player->lives += gainlives;
|
||||||
|
if (player->lives > 99)
|
||||||
|
player->lives = 99;
|
||||||
|
else if (player->lives < 1)
|
||||||
|
player->lives = 1;
|
||||||
|
|
||||||
P_PlayLivesJingle(player);
|
P_PlayLivesJingle(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -955,7 +964,30 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
||||||
//
|
//
|
||||||
void P_GivePlayerLives(player_t *player, INT32 numlives)
|
void P_GivePlayerLives(player_t *player, INT32 numlives)
|
||||||
{
|
{
|
||||||
if (player->lives == 0x7f) return;
|
if (!player)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (player->bot)
|
||||||
|
player = &players[consoleplayer];
|
||||||
|
|
||||||
|
if (gamestate == GS_LEVEL)
|
||||||
|
{
|
||||||
|
if (player->lives == 0x7f || (gametype != GT_COOP && gametype != GT_COMPETITION))
|
||||||
|
{
|
||||||
|
P_GivePlayerRings(player, 100*numlives);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0)
|
||||||
|
{
|
||||||
|
UINT8 prevlives = player->lives;
|
||||||
|
P_GivePlayerRings(player, 100*numlives);
|
||||||
|
if (player->lives - prevlives >= numlives)
|
||||||
|
return;
|
||||||
|
|
||||||
|
numlives = (numlives + prevlives - player->lives);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
player->lives += numlives;
|
player->lives += numlives;
|
||||||
|
|
||||||
|
@ -1159,11 +1191,7 @@ void P_PlayLivesJingle(player_t *player)
|
||||||
if (player && !P_IsLocalPlayer(player))
|
if (player && !P_IsLocalPlayer(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((player && player->lives == 0x7f)
|
if (use1upSound)
|
||||||
|| (!player && &players[consoleplayer] && players[consoleplayer].lives == 0x7f)
|
|
||||||
|| (gametype == GT_COOP && (netgame || multiplayer) && cv_cooplives.value == 0))
|
|
||||||
S_StartSound(NULL, sfx_lose);
|
|
||||||
else if (use1upSound)
|
|
||||||
S_StartSound(NULL, sfx_oneup);
|
S_StartSound(NULL, sfx_oneup);
|
||||||
else if (mariomode)
|
else if (mariomode)
|
||||||
S_StartSound(NULL, sfx_marioa);
|
S_StartSound(NULL, sfx_marioa);
|
||||||
|
|
|
@ -776,7 +776,7 @@ static void ST_drawLivesArea(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
livescount = ((cv_cooplives.value == 0) ? 0x7f : stplyr->lives);
|
livescount = (((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0) ? 0x7f : stplyr->lives);
|
||||||
notgreyedout = true;
|
notgreyedout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
102
src/v_video.c
102
src/v_video.c
|
@ -542,6 +542,8 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
fixed_t pwidth; // patch width
|
fixed_t pwidth; // patch width
|
||||||
fixed_t offx = 0; // x offset
|
fixed_t offx = 0; // x offset
|
||||||
|
|
||||||
|
UINT8 perplayershuffle = 0;
|
||||||
|
|
||||||
if (rendermode == render_none)
|
if (rendermode == render_none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -639,19 +641,37 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
colfrac <<= 1;
|
colfrac <<= 1;
|
||||||
x >>= 1;
|
x >>= 1;
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 4;
|
||||||
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
||||||
|
}
|
||||||
else if (stplyr == &players[secondarydisplayplayer])
|
else if (stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 8;
|
||||||
x += adjustx;
|
x += adjustx;
|
||||||
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
||||||
}
|
}
|
||||||
else if (stplyr == &players[thirddisplayplayer])
|
else if (stplyr == &players[thirddisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 4;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
scrn &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
|
scrn &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||||
}
|
}
|
||||||
else //if (stplyr == &players[fourthdisplayplayer])
|
else //if (stplyr == &players[fourthdisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 8;
|
||||||
x += adjustx;
|
x += adjustx;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
scrn &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
|
scrn &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
|
||||||
|
@ -662,9 +682,15 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
// 2 players
|
// 2 players
|
||||||
{
|
{
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle = 1;
|
||||||
scrn &= ~V_SNAPTOBOTTOM;
|
scrn &= ~V_SNAPTOBOTTOM;
|
||||||
|
}
|
||||||
else //if (stplyr == &players[secondarydisplayplayer])
|
else //if (stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle = 2;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
scrn &= ~V_SNAPTOTOP;
|
scrn &= ~V_SNAPTOTOP;
|
||||||
}
|
}
|
||||||
|
@ -710,6 +736,10 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
x += (vid.width - (BASEVIDWIDTH * dupx));
|
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||||
else if (!(scrn & V_SNAPTOLEFT))
|
else if (!(scrn & V_SNAPTOLEFT))
|
||||||
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||||
|
if (perplayershuffle & 4)
|
||||||
|
x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4;
|
||||||
|
else if (perplayershuffle & 8)
|
||||||
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 4;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
|
@ -718,6 +748,10 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
||||||
else if (!(scrn & V_SNAPTOTOP))
|
else if (!(scrn & V_SNAPTOTOP))
|
||||||
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
||||||
|
if (perplayershuffle & 1)
|
||||||
|
y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
|
||||||
|
else if (perplayershuffle & 2)
|
||||||
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -792,6 +826,8 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
UINT8 *desttop, *dest;
|
UINT8 *desttop, *dest;
|
||||||
const UINT8 *source, *deststop;
|
const UINT8 *source, *deststop;
|
||||||
|
|
||||||
|
UINT8 perplayershuffle = 0;
|
||||||
|
|
||||||
if (rendermode == render_none)
|
if (rendermode == render_none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -852,21 +888,39 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
sx >>= 1;
|
sx >>= 1;
|
||||||
w >>= 1;
|
w >>= 1;
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 4;
|
||||||
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
||||||
|
}
|
||||||
else if (stplyr == &players[secondarydisplayplayer])
|
else if (stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 8;
|
||||||
x += adjustx;
|
x += adjustx;
|
||||||
sx += adjustx;
|
sx += adjustx;
|
||||||
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
||||||
}
|
}
|
||||||
else if (stplyr == &players[thirddisplayplayer])
|
else if (stplyr == &players[thirddisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 4;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
sy += adjusty;
|
sy += adjusty;
|
||||||
scrn &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
|
scrn &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||||
}
|
}
|
||||||
else //if (stplyr == &players[fourthdisplayplayer])
|
else //if (stplyr == &players[fourthdisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
|
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 8;
|
||||||
x += adjustx;
|
x += adjustx;
|
||||||
sx += adjustx;
|
sx += adjustx;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
|
@ -879,9 +933,15 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
// 2 players
|
// 2 players
|
||||||
{
|
{
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
scrn &= ~V_SNAPTOBOTTOM;
|
scrn &= ~V_SNAPTOBOTTOM;
|
||||||
|
}
|
||||||
else //if (stplyr == &players[secondarydisplayplayer])
|
else //if (stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
sy += adjusty;
|
sy += adjusty;
|
||||||
scrn &= ~V_SNAPTOTOP;
|
scrn &= ~V_SNAPTOTOP;
|
||||||
|
@ -927,6 +987,10 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
x += (vid.width - (BASEVIDWIDTH * dupx));
|
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||||
else if (!(scrn & V_SNAPTOLEFT))
|
else if (!(scrn & V_SNAPTOLEFT))
|
||||||
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||||
|
if (perplayershuffle & 4)
|
||||||
|
x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4;
|
||||||
|
else if (perplayershuffle & 8)
|
||||||
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 4;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
|
@ -935,6 +999,10 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
||||||
else if (!(scrn & V_SNAPTOTOP))
|
else if (!(scrn & V_SNAPTOTOP))
|
||||||
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
||||||
|
if (perplayershuffle & 1)
|
||||||
|
y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
|
||||||
|
else if (perplayershuffle & 2)
|
||||||
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,6 +1149,8 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
||||||
UINT8 *dest;
|
UINT8 *dest;
|
||||||
const UINT8 *deststop;
|
const UINT8 *deststop;
|
||||||
|
|
||||||
|
UINT8 perplayershuffle = 0;
|
||||||
|
|
||||||
if (rendermode == render_none)
|
if (rendermode == render_none)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1104,19 +1174,37 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
||||||
w >>= 1;
|
w >>= 1;
|
||||||
x >>= 1;
|
x >>= 1;
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
|
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 4;
|
||||||
c &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
c &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
||||||
|
}
|
||||||
else if (stplyr == &players[secondarydisplayplayer])
|
else if (stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
|
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 8;
|
||||||
x += adjustx;
|
x += adjustx;
|
||||||
c &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
c &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
|
||||||
}
|
}
|
||||||
else if (stplyr == &players[thirddisplayplayer])
|
else if (stplyr == &players[thirddisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
|
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 4;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
c &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
|
c &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
|
||||||
}
|
}
|
||||||
else //if (stplyr == &players[fourthdisplayplayer])
|
else //if (stplyr == &players[fourthdisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
|
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
|
||||||
|
perplayershuffle |= 8;
|
||||||
x += adjustx;
|
x += adjustx;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
c &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
|
c &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
|
||||||
|
@ -1127,9 +1215,15 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
||||||
// 2 players
|
// 2 players
|
||||||
{
|
{
|
||||||
if (stplyr == &players[displayplayer])
|
if (stplyr == &players[displayplayer])
|
||||||
|
{
|
||||||
|
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 1;
|
||||||
c &= ~V_SNAPTOBOTTOM;
|
c &= ~V_SNAPTOBOTTOM;
|
||||||
|
}
|
||||||
else //if (stplyr == &players[secondarydisplayplayer])
|
else //if (stplyr == &players[secondarydisplayplayer])
|
||||||
{
|
{
|
||||||
|
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
|
||||||
|
perplayershuffle |= 2;
|
||||||
y += adjusty;
|
y += adjusty;
|
||||||
c &= ~V_SNAPTOTOP;
|
c &= ~V_SNAPTOTOP;
|
||||||
}
|
}
|
||||||
|
@ -1160,6 +1254,10 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
||||||
x += (vid.width - (BASEVIDWIDTH * dupx));
|
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||||
else if (!(c & V_SNAPTOLEFT))
|
else if (!(c & V_SNAPTOLEFT))
|
||||||
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||||
|
if (perplayershuffle & 4)
|
||||||
|
x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4;
|
||||||
|
else if (perplayershuffle & 8)
|
||||||
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 4;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
|
@ -1168,6 +1266,10 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
||||||
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
||||||
else if (!(c & V_SNAPTOTOP))
|
else if (!(c & V_SNAPTOTOP))
|
||||||
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
||||||
|
if (perplayershuffle & 1)
|
||||||
|
y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
|
||||||
|
else if (perplayershuffle & 2)
|
||||||
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -858,7 +858,7 @@ void Y_Ticker(void)
|
||||||
tallydonetic = -1;
|
tallydonetic = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intertic < 2*TICRATE) // one second pause before tally begins
|
if (intertic < 2*TICRATE) // TWO second pause before tally begins, thank you mazmazz
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -1822,13 +1822,13 @@ static void Y_AwardCoopBonuses(void)
|
||||||
players[i].score = MAXSCORE;
|
players[i].score = MAXSCORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptlives = (!ultimatemode && !modeattacking) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;
|
ptlives = (!ultimatemode && !modeattacking && players[i].lives != 0x7f) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;
|
||||||
if (ptlives)
|
if (ptlives)
|
||||||
P_GivePlayerLives(&players[i], ptlives);
|
P_GivePlayerLives(&players[i], ptlives);
|
||||||
|
|
||||||
if (i == consoleplayer)
|
if (i == consoleplayer)
|
||||||
{
|
{
|
||||||
data.coop.gotlife = ptlives;
|
data.coop.gotlife = (((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0) ? 0 : ptlives);
|
||||||
M_Memcpy(&data.coop.bonuses, &localbonuses, sizeof(data.coop.bonuses));
|
M_Memcpy(&data.coop.bonuses, &localbonuses, sizeof(data.coop.bonuses));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1866,16 +1866,15 @@ static void Y_AwardSpecialStageBonus(void)
|
||||||
players[i].score = MAXSCORE;
|
players[i].score = MAXSCORE;
|
||||||
|
|
||||||
// grant extra lives right away since tally is faked
|
// grant extra lives right away since tally is faked
|
||||||
ptlives = (!ultimatemode && !modeattacking) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;
|
ptlives = (!ultimatemode && !modeattacking && players[i].lives != 0x7f) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;
|
||||||
if (ptlives)
|
if (ptlives)
|
||||||
P_GivePlayerLives(&players[i], ptlives);
|
P_GivePlayerLives(&players[i], ptlives);
|
||||||
|
|
||||||
if (i == consoleplayer)
|
if (i == consoleplayer)
|
||||||
{
|
{
|
||||||
|
data.spec.gotlife = (((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0) ? 0 : ptlives);
|
||||||
M_Memcpy(&data.spec.bonus, &localbonus, sizeof(data.spec.bonus));
|
M_Memcpy(&data.spec.bonus, &localbonus, sizeof(data.spec.bonus));
|
||||||
|
|
||||||
data.spec.gotlife = ptlives;
|
|
||||||
|
|
||||||
// Continues related
|
// Continues related
|
||||||
data.spec.continues = min(players[i].continues, 8);
|
data.spec.continues = min(players[i].continues, 8);
|
||||||
if (players[i].gotcontinue)
|
if (players[i].gotcontinue)
|
||||||
|
|
Loading…
Reference in a new issue