Skip to content

Commit

Permalink
Extra safety
Browse files Browse the repository at this point in the history
I can't think of how these would ever be an issue, but they're the only things that stood out to me after multiple hours of testing.
  • Loading branch information
SabreML committed Feb 18, 2023
1 parent 0c8a446 commit 380f66d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SingleplayerCoopEmotes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void JollyPointUpdateHK(On.Player.orig_JollyPointUpdate orig, Pla
orig(self);
if (self.jollyButtonDown && self.PointDir() == Vector2.zero)
{
(self.graphicsModule as PlayerGraphics).LookAtPoint(self.mainBodyChunk.pos, 10f);
(self.graphicsModule as PlayerGraphics)?.LookAtPoint(self.mainBodyChunk.pos, 10f);
}
}

Expand All @@ -104,7 +104,7 @@ private static void GraphicsModuleUpdatedHK(On.Player.orig_GraphicsModuleUpdated
orig(self, actuallyViewed, eu);

// Recreation of the checks that need to pass in the base method to point a spear, but with the `ModManager.CoopAvailable` check removed.
for (int i = 0; i < self.grasps.Length; i++)
for (int i = 0; i < 2; i++)
{
if (self.grasps[i] == null || !actuallyViewed || !self.jollyButtonDown || self.handPointing != i)
{
Expand Down

0 comments on commit 380f66d

Please sign in to comment.