mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01: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:
parent
a97ba5e768
commit
1d130acc20
1 changed files with 8 additions and 0 deletions
|
@ -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),
|
||||||
|
|
Loading…
Reference in a new issue