From 8860f6c06b9ebeac1de00f7f304f7f4ce4fff520 Mon Sep 17 00:00:00 2001 From: potsmugen <107247004+potsmugen@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:08:55 +0100 Subject: [PATCH] fix: RemapPal with destination of -1 - Setting destination to -1 makes it take the same values as source - Setting both destination and source to -1 clears all remaps --- src/char.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/char.go b/src/char.go index 61563e6fd..15e0b17e4 100644 --- a/src/char.go +++ b/src/char.go @@ -4841,10 +4841,15 @@ func (c *Char) hitFallSet(f int32, xv, yv float32) { } } func (c *Char) remapPal(pfx *PalFX, src [2]int32, dst [2]int32) { - if dst[0] == -1 { + //Clear all remaps + if src[0] == -1 && dst[0] == -1 { pfx.remap = nil return } + //Reset specified source + if dst[0] == -1 { + dst = src + } if src[0] == -1 { c.forceRemapPal(pfx, dst) return