mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Fix warpdir() doing wrong BG with warp dir 0 in current room
If you're in the room being targeted when a `warpdir()` command is run, and it sets the warp direction to none (warp dir 0), and if you're in a Lab or Warp Zone room, the background will be set to the wrong one, because it will always set the background to the stars-going-left background, instead of setting it to the Lab background or the stars-going-up background. However, this is only a visual glitch, and is a temporary one, because if you manage to trigger a `gotoroom()` on the room, it will get set to its proper background. This commit makes it so if you're in a Lab room, the background gets set to the Lab background, and if you're in a Warp Zone room, the background gets set to the stars-going-up background.
This commit is contained in:
parent
5b2962fde0
commit
37a1482bb3
1 changed files with 9 additions and 0 deletions
|
@ -106,6 +106,15 @@ void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
|
|||
map.warpx=false; map.warpy=false;
|
||||
if(ed.level[curlevel].warpdir==0){
|
||||
map.background = 1;
|
||||
//Be careful, we could be in a Lab or Warp Zone room...
|
||||
if(ed.level[curlevel].tileset==2){
|
||||
//Lab
|
||||
map.background = 2;
|
||||
dwgfx.rcol = ed.level[curlevel].tilecol;
|
||||
}else if(ed.level[curlevel].tileset==3){
|
||||
//Warp Zone
|
||||
map.background = 6;
|
||||
}
|
||||
}else if(ed.level[curlevel].warpdir==1){
|
||||
map.warpx=true;
|
||||
map.background=3;
|
||||
|
|
Loading…
Reference in a new issue