add bug comments lol

This commit is contained in:
JohnCorby 2022-05-29 13:59:58 -07:00
parent 2719f0d7f0
commit 708ef97663
3 changed files with 7 additions and 0 deletions

View File

@ -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<QSBGhostBrain>();
// 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<QSBGhostBrain>().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<QSBGhostBrain>().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<QSBGhostBrain>().GetAction(GhostAction.Name.PartyHouse)).ResetAllowChasePlayer();
}
}

View File

@ -60,6 +60,7 @@ internal class GhostPartyPathDirectorPatches : QSBPatch
var ghostBrain = __instance._dispatchedGhosts[i].GetWorldObject<QSBGhostBrain>();
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;

View File

@ -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<QSBGhostBrain>().GetAction(GhostAction.Name.ElevatorWalk);
DebugLog.DebugWrite($"- CallToUseElevator on action");
QSBGhostZone2Director.ElevatorsStatus[j].elevatorAction.CallToUseElevator();