mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Fix resizing the map not changing the current room
If you're in (5, 5) (1-indexed) and you resize the map to (4,5), the editor stays in (5, 5). This has no real consequences, other than possibly confusing the user, but it should probably be fixed anyway.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
a97ba5e768
commit
1d130acc20
@@ -3261,6 +3261,14 @@ void editorinput(void)
|
|||||||
cl.mapwidth = SDL_clamp(cl.mapwidth, 1, cl.maxwidth);
|
cl.mapwidth = SDL_clamp(cl.mapwidth, 1, cl.maxwidth);
|
||||||
cl.mapheight = SDL_clamp(cl.mapheight, 1, cl.maxheight);
|
cl.mapheight = SDL_clamp(cl.mapheight, 1, cl.maxheight);
|
||||||
|
|
||||||
|
ed.updatetiles = true;
|
||||||
|
ed.changeroom = true;
|
||||||
|
graphics.backgrounddrawn = false;
|
||||||
|
graphics.foregrounddrawn = false;
|
||||||
|
|
||||||
|
ed.levx = POS_MOD(ed.levx, cl.mapwidth);
|
||||||
|
ed.levy = POS_MOD(ed.levy, cl.mapheight);
|
||||||
|
|
||||||
char buffer[3 * SCREEN_WIDTH_CHARS + 1];
|
char buffer[3 * SCREEN_WIDTH_CHARS + 1];
|
||||||
vformat_buf(
|
vformat_buf(
|
||||||
buffer, sizeof(buffer),
|
buffer, sizeof(buffer),
|
||||||
|
|||||||
Reference in New Issue
Block a user