Skip to content

Commit

Permalink
Merge pull request #1440 from Lazin3ss/development
Browse files Browse the repository at this point in the history
fix: Clamp AnimNo to 0 if its value is below zero (like MUGEN)
  • Loading branch information
K4thos committed Oct 13, 2023
2 parents 02e1fec + aa1354a commit 941fbaf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -2638,6 +2638,7 @@ func (c *Char) setJuggle(juggle int32) {
c.juggle = juggle
}
func (c *Char) changeAnimEx(animNo int32, playerNo int, ffx string, alt bool) {
animNo = Max(0, animNo) // Avoid anim no. to get below 0, set it to 0 in that case (Like MUGEN 1.1)
if a := sys.chars[playerNo][0].getAnim(animNo, ffx, true); a != nil {
c.anim = a
c.anim.remap = c.remapSpr
Expand Down

0 comments on commit 941fbaf

Please sign in to comment.