Skip to content

Commit

Permalink
fix: RemapPal with destination of -1
Browse files Browse the repository at this point in the history
- Setting destination to -1 makes it take the same values as source
- Setting both destination and source to -1 clears all remaps
  • Loading branch information
potsmugen committed Sep 23, 2023
1 parent abebeaa commit 8860f6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8860f6c

Please sign in to comment.