1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-05 16:39:44 +01:00

Merge pull request #467 from InfoTeddy/general-improvements

Remove checks to prevent having both warp lines/BGs in editor
This commit is contained in:
Terry Cavanagh 2020-09-06 14:46:56 +10:30 committed by GitHub
commit f014ed6fe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4571,26 +4571,6 @@ void editorinput()
if(key.keymap[SDLK_p]) ed.drawmode=16; if(key.keymap[SDLK_p]) ed.drawmode=16;
if(key.keymap[SDLK_w]) if(key.keymap[SDLK_w])
{
int j=0, tx=0, ty=0;
for(size_t i=0; i<edentity.size(); i++)
{
if(edentity[i].t==50)
{
tx=(edentity[i].p1-(edentity[i].p1%40))/40;
ty=(edentity[i].p2-(edentity[i].p2%30))/30;
if(tx==ed.levx && ty==ed.levy)
{
j++;
}
}
}
if(j>0)
{
ed.note="ERROR: Cannot have both warp types";
ed.notedelay=45;
}
else
{ {
ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir=(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir+1)%4; ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir=(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir+1)%4;
if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==0) if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==0)
@ -4617,7 +4597,6 @@ void editorinput()
ed.notedelay=45; ed.notedelay=45;
graphics.backgrounddrawn=false; graphics.backgrounddrawn=false;
} }
}
ed.keydelay=6; ed.keydelay=6;
} }
if(key.keymap[SDLK_e]) if(key.keymap[SDLK_e])
@ -5198,8 +5177,6 @@ void editorinput()
else if(ed.drawmode==14) else if(ed.drawmode==14)
{ {
//Warp lines //Warp lines
if(ed.level[ed.levx+(ed.maxwidth*ed.levy)].warpdir==0)
{
if(ed.tilex==0) if(ed.tilex==0)
{ {
addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),50,0); addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),50,0);
@ -5221,12 +5198,6 @@ void editorinput()
ed.note="ERROR: Warp lines must be on edges"; ed.note="ERROR: Warp lines must be on edges";
ed.notedelay=45; ed.notedelay=45;
} }
}
else
{
ed.note="ERROR: Cannot have both warp types";
ed.notedelay=45;
}
ed.lclickdelay=1; ed.lclickdelay=1;
} }
else if(ed.drawmode==15) //Crewmate else if(ed.drawmode==15) //Crewmate