If you are recording a replay and a script calls LuaPlayer.zoom_to_world to switch the player rendering mode to the "zoomed in map" mode at a given point..
Then when replaying the replay, this zoom-to-world takes effect during the replay and never reverts to the regular camera which follows the player.
Since replays don't otherwise appear to track/replay map view changes, and there's no way to change the map view interactively when watching a replay, this means that during the replay you're stuck with the camera pointing at the zoomed location while the player runs around elsewhere, out of view.
To reproduce, I started a new game with the FactorySearch 1.10.14 mod (only) enabled, and did a couple of searches for starting items (ammo in the crashed ship, wood in a wood chest). Factory Search will call zoom_to_world when you select a result, to take you to the found location.
Replay the save, and you'll see the camera detach at the point where a search result is viewed.
edit: attachments don't want to cooperate, so here's dropbox links for the save/logfile:
https://www.dropbox.com/scl/fi/x3ihz9ne ... 0xc73&dl=0
https://www.dropbox.com/scl/fi/xrwck29x ... qr7fi&dl=0
[1.1.91] zoom_to_world makes camera stop following player during replays
Re: [1.1.91] zoom_to_world makes camera stop following player during replays
brute-force workaround: append this to the save's control.lua:
(you wouldn't want to actually _play_ this save with that in place though!)
Code: Select all
script.on_nth_tick(60, function(event)
for _, p in pairs(game.players) do
p.close_map()
end
end)
Re: [1.1.91] zoom_to_world makes camera stop following player during replays
Thanks for the report. I see the issue was already fixed for 2.0.