1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Make warpdir only re-draw BG if targeted room is current room

It's unnecessary to re-draw the background if you're modifying the warp
direction of some other room.
This commit is contained in:
Misa 2020-06-25 22:31:46 -07:00 committed by Ethan Lee
parent 1cbecdda86
commit 5052391f60

View file

@ -102,11 +102,11 @@ void scriptclass::run()
{ {
ed.level[curlevel].warpdir=ss_toi(words[3]); ed.level[curlevel].warpdir=ss_toi(words[3]);
} }
//If screen warping, then override all that:
graphics.backgrounddrawn = false;
//Do we update our own room? //Do we update our own room?
if(inbounds && game.roomx-100==temprx && game.roomy-100==tempry){ if(inbounds && game.roomx-100==temprx && game.roomy-100==tempry){
//If screen warping, then override all that:
graphics.backgrounddrawn = false;
map.warpx=false; map.warpy=false; map.warpx=false; map.warpy=false;
if(ed.level[curlevel].warpdir==0){ if(ed.level[curlevel].warpdir==0){
map.background = 1; map.background = 1;