diff --git a/dev-assets/doodads/objects/exit-flag.js b/dev-assets/doodads/objects/exit-flag.js index fe530fe..9e65bf1 100644 --- a/dev-assets/doodads/objects/exit-flag.js +++ b/dev-assets/doodads/objects/exit-flag.js @@ -1,12 +1,17 @@ // Exit Flag. function main() { - Self.SetHitbox(22+16, 16, 75-16, 86); + Self.SetHitbox(22 + 16, 16, 75 - 16, 86); - Events.OnCollide(function(e) { + Events.OnCollide(function (e) { if (!e.Settled) { return; } + // Only care if it's the player. + if (!e.Actor.IsPlayer()) { + return; + } + if (e.InHitbox) { EndLevel(); }