ikemen-engine / Ikemen-GO

An open-source fighting game engine that supports MUGEN resources.
https://ikemen-engine.github.io
Other
700 stars 124 forks source link

StageBackEdgeDist trigger showing wrong values on certain stages #1996

Closed Kiwi1444 closed 1 day ago

Kiwi1444 commented 5 days ago

Describe the bug

When you near the level edge on stages Cell's arena (Day) and West city by Tahattus, StageBackEdgeDist trigger shows wrong values.

To Reproduce

  1. Download Cell's arena (Day) and West city by Tahattus
  2. Go to level edge, turn around so that the edge of the level is behind you
  3. StageBackEdgeDist should show 0, but will show a different value

Expected behavior

StageBackEdgeDist should show 0

Screenshots / Video

No response

Engine Version (or source code date)

Nightly 2024-09-03

Operating system

Windows

Extra context or search terms

No response

potsmugen commented 4 days ago

This is because these values:

boundleft = -3800
boundright = 3800

Are larger than these:

leftbound =-2500
rightbound =2500

Which is incorrect. So the chars never actually reach the end of the stage.

Maybe the trigger can be updated to use whichever is smaller. That sounds a bit like enabling poor stage code though. Maybe a debug message informing of that mistake would be better?

Kiwi1444 commented 3 days ago

I don't know which decision will be correct. But if the error is rare, a message will be enough. I have 20 stages and this error occurs only on these two.

potsmugen commented 2 days ago

I'm working on implementing both. The trigger will work correctly but debug will print a warning.