Skip to content

Commit

Permalink
fix(zc): reset playing_field_offset at beginning of scroll
Browse files Browse the repository at this point in the history
This prevents the draw offset from a quake from persisting during a
scroll.

See https://discord.com/channels/876899628556091432/1238226802867048529
  • Loading branch information
connorjclark committed May 16, 2024
1 parent e943801 commit 5e1f431
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/zc/hero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28306,7 +28306,9 @@ void HeroClass::scrollscr(int32_t scrolldir, int32_t destscr, int32_t destdmap)
unsetmapflag(mSECRET);
fixed_door = false;
}
//Z_scripterrlog("Setting 'scrolling_scr' from %d to %d\n", scrolling_scr, currscr);

playing_field_offset = original_playing_field_offset;

scrolling_scr = currscr;

switch(scrolldir)
Expand Down
4 changes: 2 additions & 2 deletions tests/replays/freedom_in_chains.zplay
Git LFS file not shown
4 changes: 2 additions & 2 deletions tests/replays/scripting/100_rooms_of_wisdom.zplay
Git LFS file not shown
4 changes: 2 additions & 2 deletions tests/replays/yuurand.zplay
Git LFS file not shown

0 comments on commit 5e1f431

Please sign in to comment.