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 ee8948d627
commit 67d6ee3b12

View file

@ -1955,6 +1955,7 @@ static void
Command_View_f (void)
{
INT32 *displayplayerp;
INT32 olddisplayplayer;
int viewnum;
INT32 playernum, oldplayernum;
char c;
@ -1971,15 +1972,6 @@ Command_View_f (void)
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)
{
CONS_Alert(CONS_WARNING, "There is no player by that name!\n");
@ -1993,12 +1985,14 @@ Command_View_f (void)
playernum = RoundToValidPlayerNum(playernum);
}
if ((*displayplayerp) == playernum)
return;
olddisplayplayer = (*displayplayerp);
(*displayplayerp) = playernum;
G_ResetViews(viewnum);
/* The player we wanted was corrected to who it already was. */
if ((*displayplayerp) == olddisplayplayer)
return;
if ((*displayplayerp) != oldplayernum)/* differ parameter */
{
if (playernum == oldplayernum)/* skipped some */