Skip to content

Commit

Permalink
Merge pull request #261 from AoTTG-2/Thyme/SpectateFixes
Browse files Browse the repository at this point in the history
Small bug
  • Loading branch information
AutumnThyme authored Feb 14, 2025
2 parents 14175dd + bb2327f commit cb7e29e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Assets/Scripts/Cameras/InGameCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InGameCamera : BaseCamera
public enum SpecateMode
{
LiveSpectate,
OrbitSpecate,
OrbitSpectate,
FreeCam
}

Expand Down Expand Up @@ -236,7 +236,7 @@ protected override void LateUpdate()
SetFollow(_inGameManager.CurrentCharacter);
if (_inGameManager.CurrentCharacter == null)
{
if (!ChatManager.IsChatActive() && !InGameMenu.InMenu() && _input.ChangeCamera.GetKeyDown())
if (!ChatManager.IsChatActive() && !InGameMenu.InMenu() && _input.ChangeCamera.GetKey())
SpecMode.Next();
}
else
Expand Down Expand Up @@ -266,7 +266,7 @@ protected override void LateUpdate()
}
else if (SpecMode.Current() == SpecateMode.FreeCam)
UpdateFreeCam();
else if (SpecMode.Current() == SpecateMode.LiveSpectate || SpecMode.Current() == SpecateMode.OrbitSpecate)
else if (SpecMode.Current() == SpecateMode.LiveSpectate || SpecMode.Current() == SpecateMode.OrbitSpectate)
SpecMode.Set(SpecateMode.FreeCam);
}
UpdateFOV();
Expand Down Expand Up @@ -406,7 +406,7 @@ private void UpdateSpectate()
var cameraDistance = GetCameraDistance();
float offset = Mathf.Max(cameraDistance, 0.3f) * (200f - Camera.fieldOfView) / 150f;
var correctCamera = _follow.GetComponent<BaseMovementSync>()._correctCamera;
if (SpecMode.Current() == SpecateMode.OrbitSpecate)
if (SpecMode.Current() == SpecateMode.OrbitSpectate)
{
Cache.Transform.position = _follow.GetCameraAnchor().position;
Cache.Transform.position += Vector3.up * GetHeightDistance() * SettingsManager.GeneralSettings.CameraHeight.Value;
Expand Down Expand Up @@ -469,7 +469,7 @@ private void UpdateFreeCam()
{
if (!InGameMenu.InMenu() && !ChatManager.IsChatActive())
{
if (_input.SpectateNextPlayer.GetKeyDown() || _input.SpectatePreviousPlayer.GetKey())
if (_input.SpectateNextPlayer.GetKeyDown() || _input.SpectatePreviousPlayer.GetKeyDown())
{
SpecMode.Next();
return;
Expand Down
1 change: 0 additions & 1 deletion Assets/Scripts/UI/MapEditorMenu/MapEditorMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using System.Collections;
using Utility;
using RuntimeSceneGizmo;
using UnityEditor.VersionControl;

namespace UI
{
Expand Down

0 comments on commit cb7e29e

Please sign in to comment.