Skip to content

Commit

Permalink
#644 The LocalPlayer has been moved to a class of its own.
Browse files Browse the repository at this point in the history
  • Loading branch information
koschke committed Oct 5, 2023
1 parent 57f5865 commit c455922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/SEE/GameObjects/Menu/PlayerMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using SEE.Controls;
using SEE.Controls.Actions;
using SEE.Game;
using SEE.UI.Menu;
using SEE.UI.StateIndicator;
using SEE.Utils;
Expand Down Expand Up @@ -222,7 +223,7 @@ private void Update()
/// <param name="actionName">name of the menu entry to be </param>
private static void SetPlayerMenu(string actionName)
{
if (SceneSettings.LocalPlayer.TryGetComponentOrLog(out PlayerMenu playerMenu))
if (LocalPlayer.Instance.TryGetComponentOrLog(out PlayerMenu playerMenu))
{
// We cannot use PlayerActionHistory.Current here
playerMenu.modeMenu.ActiveEntry = playerMenu.modeMenu.Entries.First(x => x.Title.Equals(actionName));
Expand Down

0 comments on commit c455922

Please sign in to comment.