save last zoom value if setting the camera viewport without locking it

This commit is contained in:
Hanusiak Piotr 2022-01-13 16:17:49 +01:00
parent d62b116e5d
commit d99930a67e
2 changed files with 1 additions and 10 deletions

View File

@ -80,6 +80,7 @@ export class CameraManager extends Phaser.Events.EventEmitter {
return;
}
this.setCameraMode(CameraMode.Positioned);
this.waScaleManager.saveZoom();
const currentZoomModifier = this.waScaleManager.zoomModifier;
const zoomModifierChange = this.getZoomModifierChange(setTo.width, setTo.height);
this.camera.stopFollow();

View File

@ -1128,16 +1128,6 @@ ${escapedMessage}
})
);
// this.iframeSubscriptionList.push(
// iframeListener.cameraFocusOnStream.subscribe((cameraFocusOnEvent) => {
// this.cameraManager.enterFocusMode(
// { ...cameraFocusOnEvent },
// undefined,
// cameraFocusOnEvent.smooth ? 1000 : 0
// );
// })
// );
this.iframeSubscriptionList.push(
iframeListener.cameraFollowPlayerStream.subscribe((cameraFollowPlayerEvent) => {
this.cameraManager.leaveFocusMode(this.CurrentPlayer, cameraFollowPlayerEvent.smooth ? 1000 : 0);