Shut up when our "new" viewpoint is just the same

Also actually correct for new splits.
This commit is contained in:
james 2019-02-04 17:54:41 -08:00
parent 8a1c6114a7
commit f99a7dc36b

View file

@ -1955,6 +1955,7 @@ static void
Command_View_f (void) Command_View_f (void)
{ {
INT32 *displayplayerp; INT32 *displayplayerp;
INT32 olddisplayplayer;
int viewnum; int viewnum;
INT32 playernum, oldplayernum; INT32 playernum, oldplayernum;
char c; char c;
@ -1971,15 +1972,6 @@ Command_View_f (void)
if (COM_Argc() > 1)/* switch to player */ if (COM_Argc() > 1)/* switch to player */
{ {
if (viewnum > splitscreen+2)/* We must arrange in order. */
{
CONS_Alert(CONS_WARNING,
"You may not change viewpoints more than "
"once ahead the current number of splits. "
"Use view%d instead.\n", splitscreen+2);
return;
}
if (( playernum = LookupPlayer(COM_Argv(1)) ) == -1) if (( playernum = LookupPlayer(COM_Argv(1)) ) == -1)
{ {
CONS_Alert(CONS_WARNING, "There is no player by that name!\n"); CONS_Alert(CONS_WARNING, "There is no player by that name!\n");
@ -1993,12 +1985,14 @@ Command_View_f (void)
playernum = RoundToValidPlayerNum(playernum); playernum = RoundToValidPlayerNum(playernum);
} }
if ((*displayplayerp) == playernum) olddisplayplayer = (*displayplayerp);
return;
(*displayplayerp) = playernum; (*displayplayerp) = playernum;
G_ResetViews(viewnum); G_ResetViews(viewnum);
/* The player we wanted was corrected to who it already was. */
if ((*displayplayerp) == olddisplayplayer)
return;
if ((*displayplayerp) != oldplayernum)/* differ parameter */ if ((*displayplayerp) != oldplayernum)/* differ parameter */
{ {
if (playernum == oldplayernum)/* skipped some */ if (playernum == oldplayernum)/* skipped some */