Skip to content

Commit 7d8d3c0

Browse files
committed
fix mouselook enabled in pause menu
1 parent 9d79540 commit 7d8d3c0

File tree

3 files changed

+2
-32
lines changed

3 files changed

+2
-32
lines changed

Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Threading.Tasks;
66
using MelonLoader;
77
using UnityEngine;
8-
[assembly: MelonInfo(typeof(SuperliminalPracticeMod.Main), "Superliminal Practice Mod", "0.2.0", "Micrologist#2351")]
8+
[assembly: MelonInfo(typeof(SuperliminalPracticeMod.Main), "Superliminal Practice Mod", "0.2.1", "Micrologist#2351")]
99
[assembly: MelonGame("PillowCastle", "Superliminal")]
1010
[assembly: MelonGame("PillowCastle", "SuperliminalSteam")]
1111

PracticeModManager.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class PracticeModManager : MonoBehaviour
2525
public Text grabbedObejctText;
2626
public PauseMenu pauseMenu;
2727

28-
2928
Vector3 storedPosition;
3029
Quaternion storedRotation;
3130
float storedScale;
@@ -51,14 +50,9 @@ void Awake()
5150
GameManager.GM.enableDebugFunctions = true;
5251
debugFunctions = false;
5352
GameManager.GM.GetComponent<LevelInformation>().LevelInfo.RandomLoadingScreens = new SceneReference[1] { GameManager.GM.GetComponent<LevelInformation>().LevelInfo.NormalLoadingScreen };
54-
5553
base.gameObject.AddComponent<SLPMod_Console>();
56-
5754
}
5855

59-
60-
61-
6256
void Update()
6357
{
6458
if (Input.GetKeyDown(KeyCode.F11))
@@ -112,7 +106,6 @@ void Update()
112106
SLPMod_Console.instance.active = false;
113107
}
114108

115-
116109
if (Input.GetKeyDown(KeyCode.K))
117110
{
118111
noClip = !noClip;
@@ -126,7 +119,6 @@ void Update()
126119
flashLight.gameObject.SetActive(!flashLight.gameObject.activeSelf);
127120
}
128121

129-
130122
if (noClip)
131123
{
132124
this.noClipSpeed += Input.mouseScrollDelta.y;
@@ -187,9 +179,6 @@ void Update()
187179
GameManager.GM.player.GetComponent<PlayerResizer>().Poke();
188180
}
189181

190-
191-
192-
193182
if (Input.GetKeyDown(KeyCode.F4) && !noClip)
194183
unlimitedRenderDistance = !unlimitedRenderDistance;
195184

@@ -269,8 +258,6 @@ Text NewGrabbedObjectText()
269258
return newText;
270259
}
271260

272-
273-
274261
string GetPlayerTextString()
275262
{
276263
Vector3 position = playerMotor.transform.localPosition;
@@ -297,7 +284,6 @@ string GetPlayerTextString()
297284
if (Time.time - this.teleportTime <= 1f)
298285
dynamicInfo += "\nTeleport";
299286

300-
301287
return string.Concat(new object[]
302288
{
303289
"Position: ",

SLPMod_Console.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,21 @@ class SLPMod_Console : MonoBehaviour
1414
{
1515
public static SLPMod_Console instance;
1616
public bool active;
17-
public bool setFocus;
18-
19-
2017
string input;
2118

2219

2320
private void Awake()
2421
{
2522
instance = this;
2623
active = false;
27-
setFocus = false;
2824
input = "";
2925
}
3026

3127
private void OnGUI()
3228
{
33-
34-
35-
36-
37-
if (GameManager.GM.player != false)
29+
if (GameManager.GM.player != false && PracticeModManager.Instance.pauseMenu.isInMenu == false)
3830
GameManager.GM.PM.canControl = !active;
3931

40-
41-
4232
if (!active)
4333
return;
4434

@@ -58,16 +48,11 @@ private void OnGUI()
5848
return;
5949
}
6050

61-
6251
GUI.Box(new Rect(0, y, Screen.width, 30), "");
6352
GUI.backgroundColor = new Color(0, 0, 0, 0);
6453
GUI.SetNextControlName("SLP_Console");
6554
input = GUI.TextField(new Rect(10f, y + 5f, Screen.width - 20f, 20f), input);
6655
GUI.FocusControl("SLP_Console");
67-
68-
69-
70-
7156
}
7257

7358
private void ParseCommand(string command)
@@ -107,7 +92,6 @@ private void ParseCommand(string command)
10792
public void Toggle()
10893
{
10994
active = !active;
110-
setFocus = active;
11195
}
11296

11397
}

0 commit comments

Comments
 (0)