Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModifyStageVar unintentionally changing p1startx #1720

Open
RealFoobs opened this issue Apr 1, 2024 · 2 comments
Open

ModifyStageVar unintentionally changing p1startx #1720

RealFoobs opened this issue Apr 1, 2024 · 2 comments

Comments

@RealFoobs
Copy link
Contributor

Describe the bug

ModifyStageVar is changing the starting position of p1 under specific circumstances, interfering with intros.

To Reproduce

  1. Add this code to KFMZ (any modifystagevar parameter yields the same results):
    [Statedef -4]
    ignorehitpause {modifystagevar{}}
  2. From a command line, start a KFMZ mirror match.
  3. P1 KFMZ will start his intro right on P2 KFMZ's face, and will warp back to the regular starting position before roundstate = 2.

Expected behavior

The intro should just work as normal.

Screenshots / Video

ikemen010
ikemen011

Engine Version (or source code date)

Current nightly (2024-04-01)

Operating system

Windows

Extra context or search terms

Now here's the messed up part:

This only happens the first time you the load the engine. Hitting F4 or Shift+F4 afterwards does cause the bug to happen again. Adding a check for fighttime > 0 prevents this bug. It's possible ikemen operates on "special" logic on the very frame of a fight.

@Jesuszilla
Copy link
Contributor

Jesuszilla commented Apr 12, 2024

Changing oldTickCount to start at 0 rather than -1 in resetFrameTime() seems to fix this?!

EDIT: Fix I applied on top of fantasma's build from #952 seems to behave different from the nightly when applied; it screws with the camera in the latter...

@potsmugen
Copy link
Contributor

I've been wondering if we shouldn't just make ModifyStageVar do nothing in the first frame of the stage, instead of modifying stage code to accomodate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants