Skip to content

Commit

Permalink
add bug comments lol
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCorby committed May 29, 2022
1 parent 2719f0d commit 708ef97
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static bool UnlockGhostForAmbush(GhostPartyDirector __instance, bool firs
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)
Expand Down Expand Up @@ -68,10 +69,12 @@ public static bool OnEnterAmbushTrigger(GhostPartyDirector __instance, GameObjec
__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);
}
}
Expand Down Expand Up @@ -100,6 +103,7 @@ public static bool OnEnterSector(GhostPartyDirector __instance, SectorDetector d
__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();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public static bool Update(GhostPartyPathDirector __instance)
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)
{
Expand Down Expand Up @@ -101,6 +102,7 @@ public static bool Update(GhostPartyPathDirector __instance)
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public static bool OnLightsExtinguished(GhostZone2Director __instance)
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();
Expand Down

0 comments on commit 708ef97

Please sign in to comment.