Merge branch 'dev' into eote-ghost-ai-multiple-players

This commit is contained in:
JohnCorby 2022-04-07 10:59:36 -07:00
commit 26c040367c
2 changed files with 9 additions and 19 deletions

View File

@ -36,7 +36,7 @@ internal class ItemRemotePatches : QSBPatch
{ {
__instance._lanternController.enabled = true; __instance._lanternController.enabled = true;
__instance._lanternController.SetDetectorScaleCompensation(__instance._lanternController.transform.lossyScale); __instance._lanternController.SetDetectorScaleCompensation(__instance._lanternController.transform.lossyScale);
// __instance._lanternController.SetHeldByPlayer(true); __instance._lanternController.SetHeldByPlayer(true);
// Locator.GetPlayerController().SetDreamLantern(__instance); // Locator.GetPlayerController().SetDreamLantern(__instance);
} }
@ -127,7 +127,7 @@ internal class ItemRemotePatches : QSBPatch
if (__instance._lanternController != null) if (__instance._lanternController != null)
{ {
__instance._lanternController.SetDetectorScaleCompensation(__instance._lanternController.transform.lossyScale); __instance._lanternController.SetDetectorScaleCompensation(__instance._lanternController.transform.lossyScale);
// __instance._lanternController.SetHeldByPlayer(false); __instance._lanternController.SetHeldByPlayer(false);
__instance._lanternController.enabled = __instance._lanternController.IsLit(); __instance._lanternController.enabled = __instance._lanternController.IsLit();
// Locator.GetPlayerController().SetDreamLantern(null); // Locator.GetPlayerController().SetDreamLantern(null);
} }
@ -195,7 +195,7 @@ internal class ItemRemotePatches : QSBPatch
{ {
__instance._lanternController.SetDetectorScaleCompensation(__instance._lanternController.transform.lossyScale); __instance._lanternController.SetDetectorScaleCompensation(__instance._lanternController.transform.lossyScale);
__instance._lanternController.SetSocketed(true); __instance._lanternController.SetSocketed(true);
// __instance._lanternController.SetHeldByPlayer(false); __instance._lanternController.SetHeldByPlayer(false);
__instance._lanternController.enabled = __instance._lanternController.IsLit(); __instance._lanternController.enabled = __instance._lanternController.IsLit();
// Locator.GetPlayerController().SetDreamLantern(null); // Locator.GetPlayerController().SetDreamLantern(null);
} }

View File

@ -81,6 +81,12 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart
return; return;
} }
DrawGui();
DrawWorldObjectLabels();
}
private static void DrawGui()
{
guiGUIStyle.normal.textColor = Color.white; guiGUIStyle.normal.textColor = Color.white;
GUI.contentColor = Color.white; GUI.contentColor = Color.white;
@ -89,12 +95,6 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart
column3Offset = 10f; column3Offset = 10f;
column4Offset = 10f; column4Offset = 10f;
DrawGui();
DrawWorldObjectLabels();
}
private static void DrawGui()
{
#region Column1 - Server data #region Column1 - Server data
WriteLine(1, $"FPS : {Mathf.Round(1f / Time.smoothDeltaTime)}"); WriteLine(1, $"FPS : {Mathf.Round(1f / Time.smoothDeltaTime)}");
@ -271,11 +271,6 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart
foreach (var obj in QSBWorldSync.GetWorldObjects()) foreach (var obj in QSBWorldSync.GetWorldObjects())
{ {
if (obj.AttachedObject == null)
{
return;
}
if (obj.ShouldDisplayDebug()) if (obj.ShouldDisplayDebug())
{ {
DrawLabel(obj.AttachedObject.transform, obj.ReturnLabel()); DrawLabel(obj.AttachedObject.transform, obj.ReturnLabel());
@ -294,11 +289,6 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart
foreach (var obj in QSBWorldSync.GetWorldObjects()) foreach (var obj in QSBWorldSync.GetWorldObjects())
{ {
if (obj.AttachedObject == null)
{
return;
}
if (obj.ShouldDisplayDebug()) if (obj.ShouldDisplayDebug())
{ {
obj.DisplayLines(); obj.DisplayLines();