From 1c3af8124acc3341bb9be68875e36c896af7ded2 Mon Sep 17 00:00:00 2001 From: QuantumCoderQC Date: Wed, 27 Dec 2023 21:14:13 +0100 Subject: [PATCH 1/3] Reset time to 0 at play --- Sources/iron/object/Tilesheet.hx | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/iron/object/Tilesheet.hx b/Sources/iron/object/Tilesheet.hx index 210f68aa..d7a70ba3 100644 --- a/Sources/iron/object/Tilesheet.hx +++ b/Sources/iron/object/Tilesheet.hx @@ -45,6 +45,7 @@ class Tilesheet { } setFrame(action.start); paused = false; + time = 0.0; } public function pause() { From 0c4b7f3cb37d48bbc072fe39f1e6d88b8931e018 Mon Sep 17 00:00:00 2001 From: QuantumCoderQC Date: Wed, 27 Dec 2023 21:15:00 +0100 Subject: [PATCH 2/3] Check for frame end before setting the frame. --- Sources/iron/object/Tilesheet.hx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Sources/iron/object/Tilesheet.hx b/Sources/iron/object/Tilesheet.hx index d7a70ba3..ea4e0201 100644 --- a/Sources/iron/object/Tilesheet.hx +++ b/Sources/iron/object/Tilesheet.hx @@ -101,16 +101,17 @@ class Tilesheet { function setFrame(f: Int) { frame = f; - var tx = frame % raw.tilesx; - var ty = Std.int(frame / raw.tilesx); - tileX = tx * (1 / raw.tilesx); - tileY = ty * (1 / raw.tilesy); - // Action end - if (frame >= action.end && action.start < action.end) { + if (frame > action.end && action.start < action.end) { if (onActionComplete != null) onActionComplete(); if (action.loop) setFrame(action.start); else paused = true; + return; } + + var tx = frame % raw.tilesx; + var ty = Std.int(frame / raw.tilesx); + tileX = tx * (1 / raw.tilesx); + tileY = ty * (1 / raw.tilesy); } } From 5db3bb980211e3e9bb0716883ae28a5c68323759 Mon Sep 17 00:00:00 2001 From: e2002e Date: Wed, 14 Feb 2024 22:00:51 +0100 Subject: [PATCH 3/3] getMaxLightsCluster() getMaxLights() return 24 --- Sources/iron/object/LightObject.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/iron/object/LightObject.hx b/Sources/iron/object/LightObject.hx index 5323ceef..b9c3a8b1 100644 --- a/Sources/iron/object/LightObject.hx +++ b/Sources/iron/object/LightObject.hx @@ -634,6 +634,8 @@ class LightObject extends Object { return 8; #elseif (rp_max_lights == 16) return 16; + #elseif (rp_max_lights == 24) + return 24; #elseif (rp_max_lights == 32) return 32; #elseif (rp_max_lights == 64) @@ -648,6 +650,8 @@ class LightObject extends Object { return 8; #elseif (rp_max_lights_cluster == 16) return 16; + #elseif (rp_max_lights_cluster == 24) + return 24; #elseif (rp_max_lights_cluster == 32) return 32; #elseif (rp_max_lights_cluster == 64)