From 7a67aa2f35ed00d977cc00f090bf531c1e218d3d Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 26 Feb 2023 02:19:19 -0800 Subject: [PATCH] Let viewpoints underwrap This means that if you're currently viewing the first player in game and try to switch view to the player before them, it will wrap around and view the last player in game. --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 0e7e4cac4..0be648c30 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1964,7 +1964,7 @@ boolean G_CanView(INT32 playernum, UINT8 viewnum, boolean onlyactive) INT32 G_FindView(INT32 startview, UINT8 viewnum, boolean onlyactive, boolean reverse) { INT32 i, dir = reverse ? -1 : 1; - startview = min(max(startview, 0), MAXPLAYERS); + startview = min(max(startview, -1), MAXPLAYERS); for (i = startview; i < MAXPLAYERS && i >= 0; i += dir) { if (G_CanView(i, viewnum, onlyactive))