Skip to content

Commit

Permalink
Use common property in CameraOffsetBorder as well
Browse files Browse the repository at this point in the history
  • Loading branch information
maddie480 authored Nov 7, 2024
1 parent a935a88 commit 0df6ee6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Triggers/CameraOffsetBorder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Celeste.Mod.Entities;
using Celeste.Mod.MaxHelpingHand.Module;
using Microsoft.Xna.Framework;
using Monocle;
using MonoMod.Cil;
Expand Down Expand Up @@ -88,7 +89,7 @@ private static Vector2 modCameraTarget(Func<Player, Vector2> orig, Player self)

Vector2 target = orig(self);

Rectangle viewpoint = new Rectangle((int) target.X, (int) target.Y, (GameplayBuffers.Gameplay?.Width ?? 320), (GameplayBuffers.Gameplay?.Height ?? 180));
Rectangle viewpoint = new Rectangle((int) target.X, (int) target.Y, MaxHelpingHandModule.GameplayWidth, MaxHelpingHandModule.GameplayHeight);
foreach (CameraOffsetBorder border in self.Scene.Tracker.GetEntities<CameraOffsetBorder>()) {
while (border.Collidable && border.CollideRect(viewpoint)) {
// the border is enabled and on-screen, unacceptable!
Expand Down

0 comments on commit 0df6ee6

Please sign in to comment.