+#if 1
+ if (tape.set_centered_player)
+ {
+ game.centered_player_nr_next = tape.centered_player_nr_next;
+ game.set_centered_player = TRUE;
+ }
+
+ if (game.set_centered_player)
+ {
+ boolean all_players_fit_to_screen = checkIfAllPlayersFitToScreen_RND();
+
+ /* switching to "all players" only possible if all players fit to screen */
+ if (game.centered_player_nr_next == -1 && !all_players_fit_to_screen)
+ {
+ game.centered_player_nr_next = game.centered_player_nr;
+ game.set_centered_player = FALSE;
+ }
+
+ /* do not switch focus to non-existing (or non-active) player */
+ if (game.centered_player_nr_next >= 0 &&
+ !stored_player[game.centered_player_nr_next].active)
+ {
+ game.centered_player_nr_next = game.centered_player_nr;
+ game.set_centered_player = FALSE;
+ }
+ }
+
+ if (game.set_centered_player &&
+ ScreenMovPos == 0) /* screen currently aligned at tile position */
+ {
+#if 0
+ struct PlayerInfo *player;
+ int player_nr = game.centered_player_nr_next;
+#endif
+ int sx, sy;
+
+ if (game.centered_player_nr_next == -1)
+ {
+ setScreenCenteredToAllPlayers(&sx, &sy);
+ }
+ else
+ {
+ sx = stored_player[game.centered_player_nr_next].jx;
+ sy = stored_player[game.centered_player_nr_next].jy;
+ }
+
+#if 0
+ player = &stored_player[player_nr];
+
+ if (!player->active)
+ game.centered_player_nr_next = game.centered_player_nr;
+
+ sx = player->jx;
+ sy = player->jy;
+#endif
+
+#if 0
+ if (game.centered_player_nr != game.centered_player_nr_next)
+#endif
+ {
+#if 1
+ DrawRelocateScreen(sx, sy, MV_NONE, TRUE, setup.quick_switch);
+#else
+ DrawRelocatePlayer(player, setup.quick_switch);
+#endif
+
+ game.centered_player_nr = game.centered_player_nr_next;
+ }
+
+ game.set_centered_player = FALSE;
+ }
+#endif
+