PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
38 stars 8 forks source link

FREEZETAG: Spectator is "frozen" #192

Closed kai-li-wop closed 1 year ago

kai-li-wop commented 1 year ago

I just did some local testing and found that if you are watching a game as a spectator and cycle through the players, in my case a total of 8 bots, you end up with the frozen screen of the last player in the cycle before returning to spectator view. This bug seems to be visual only, as you can move normally as a spectator. Reproduction steps:

  1. start a local freeze tag game, for example with 8 bots, 4 in each team.
  2. stay spectator and watch the game
  3. click through all players in follow mode
  4. the last player you watch must be frozen before you come back to your spectator view
  5. you should now have the same view as in the screenshot below
  6. Is the last player in the cycle not frozen, you should have the normal spectator view

shot0000

mgerhardy commented 1 year ago

the problem is most likely that the snapshot if not updated anymore in spectator mode - and thus it's assumed that the spectator is still frozen - because the last player was.

diff --git a/code/cgame/cg_freezetag.c b/code/cgame/cg_freezetag.c
index a8c195bc..9553e6d5 100644
--- a/code/cgame/cg_freezetag.c
+++ b/code/cgame/cg_freezetag.c
@@ -27,6 +27,11 @@ qboolean CG_FreezeTag(void) {
 }

 qboolean FT_LocalIsFrozen(void) {
+       if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR) {
+               if (!(cg.snap->ps.pm_flags & PMF_FOLLOW)) {
+                       return qfalse;
+               }
+       }
        return cg.snap->ps.powerups[PW_FREEZE];
 }
kai-li-wop commented 1 year ago

@mgerhardy: Your code snippet seems to fix the issue nearly. There is only one issue with the thawer icon. ;)

shot0000

kai-li-wop commented 1 year ago

Ah ok, sorry. My last posting is outdated, you fixed this issue too meanwhile.

3aTmE commented 1 year ago

I can confirm the fix.

After following the steps on the initial comment i wasn't able to replicate this.