From 708ef97663767509fee493f7b215bc39f96d2d24 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 29 May 2022 13:59:58 -0700 Subject: [PATCH] add bug comments lol --- .../Ghosts/Patches/GhostPartyDirectorPatches.cs | 4 ++++ .../Ghosts/Patches/GhostPartyPathDirectorPatches.cs | 2 ++ .../Ghosts/Patches/GhostZone2DirectorPatches.cs | 1 + 3 files changed, 7 insertions(+) diff --git a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyDirectorPatches.cs b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyDirectorPatches.cs index e7f8cd5d..5355d744 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyDirectorPatches.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyDirectorPatches.cs @@ -34,6 +34,7 @@ internal class GhostPartyDirectorPatches : QSBPatch var index = Random.Range(0, __instance._ghostsWaitingToAmbush.Count); DebugLog.DebugWrite($"Unlocking ghost {index} for ambush."); var ghost = __instance._ghostsWaitingToAmbush[index].GetWorldObject(); + // BUG: breaks on client cuz cast ((QSBPartyHouseAction)ghost.GetAction(GhostAction.Name.PartyHouse)).AllowChasePlayer(); ghost.HintPlayerLocation(ghost._data.players.MinBy(x => x.Value.playerLocation.distance).Key); if (firstAmbush) @@ -68,10 +69,12 @@ internal class GhostPartyDirectorPatches : QSBPatch __instance._ambushTriggered = true; __instance._waitingToAmbushInitial = true; __instance._ambushTriggerTime = Time.time + (__instance._ambushTriggeredThisLoop ? __instance._secondaryAmbushDelay : __instance._initialAmbushDelay); + // BUG: breaks on client cuz cast ((QSBPartyHouseAction)__instance._fireplaceGhost.GetWorldObject().GetAction(GhostAction.Name.PartyHouse)).LookAtPlayer(0f, TurnSpeed.MEDIUM); for (int i = 0; i < __instance._ambushGhosts.Length; i++) { float delay = (float)i; + // BUG: breaks on client cuz cast ((QSBPartyHouseAction)__instance._ambushGhosts[i].GetWorldObject().GetAction(GhostAction.Name.PartyHouse)).LookAtPlayer(delay, TurnSpeed.SLOWEST); } } @@ -100,6 +103,7 @@ internal class GhostPartyDirectorPatches : QSBPatch __instance._ghostsWaitingToAmbush.AddRange(__instance._ambushGhosts); for (int i = 0; i < __instance._directedGhosts.Length; i++) { + // BUG: breaks on client cuz cast ((QSBPartyHouseAction)__instance._directedGhosts[i].GetWorldObject().GetAction(GhostAction.Name.PartyHouse)).ResetAllowChasePlayer(); } } diff --git a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs index ebc0642e..9db6902a 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostPartyPathDirectorPatches.cs @@ -60,6 +60,7 @@ internal class GhostPartyPathDirectorPatches : QSBPatch var ghostBrain = __instance._dispatchedGhosts[i].GetWorldObject(); if (ghostBrain.GetCurrentActionName() == GhostAction.Name.PartyPath) { + // BUG: breaks on client cuz cast var partyPathAction = (QSBPartyPathAction)ghostBrain.GetCurrentAction(); if (partyPathAction.hasReachedEndOfPath) { @@ -101,6 +102,7 @@ internal class GhostPartyPathDirectorPatches : QSBPatch var num = Random.Range(0, __instance._ghostSpawns.Length); ghostBrain2.AttachedObject.transform.position = __instance._ghostSpawns[num].spawnTransform.position; ghostBrain2.AttachedObject.transform.eulerAngles = Vector3.up * __instance._ghostSpawns[num].spawnTransform.eulerAngles.y; + // BUG: breaks on client cuz cast ((QSBPartyPathAction)ghostBrain2.GetCurrentAction()).StartFollowPath(); __instance._ghostSpawns[num].spawnDoor.Open(); __instance._ghostSpawns[num].spawnDoorTimer = Time.timeSinceLevelLoad + 4f; diff --git a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostZone2DirectorPatches.cs b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostZone2DirectorPatches.cs index e4979a08..0533be1b 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostZone2DirectorPatches.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostZone2DirectorPatches.cs @@ -200,6 +200,7 @@ internal class GhostZone2DirectorPatches : QSBPatch DebugLog.DebugWrite($"- fade light down"); QSBGhostZone2Director.ElevatorsStatus[j].elevatorPair.elevator.topLight.FadeTo(0f, 0.2f); DebugLog.DebugWrite($"- get action"); + // BUG: breaks on client cuz cast QSBGhostZone2Director.ElevatorsStatus[j].elevatorAction = (QSBElevatorWalkAction)__instance._elevators[j].ghost.GetWorldObject().GetAction(GhostAction.Name.ElevatorWalk); DebugLog.DebugWrite($"- CallToUseElevator on action"); QSBGhostZone2Director.ElevatorsStatus[j].elevatorAction.CallToUseElevator();