mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-03 15:39:46 +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:
commit
f014ed6fe8
1 changed files with 35 additions and 64 deletions
|
@ -4571,26 +4571,6 @@ void editorinput()
|
|||
if(key.keymap[SDLK_p]) ed.drawmode=16;
|
||||
|
||||
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;
|
||||
if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==0)
|
||||
|
@ -4617,7 +4597,6 @@ void editorinput()
|
|||
ed.notedelay=45;
|
||||
graphics.backgrounddrawn=false;
|
||||
}
|
||||
}
|
||||
ed.keydelay=6;
|
||||
}
|
||||
if(key.keymap[SDLK_e])
|
||||
|
@ -5198,8 +5177,6 @@ void editorinput()
|
|||
else if(ed.drawmode==14)
|
||||
{
|
||||
//Warp lines
|
||||
if(ed.level[ed.levx+(ed.maxwidth*ed.levy)].warpdir==0)
|
||||
{
|
||||
if(ed.tilex==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.notedelay=45;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ed.note="ERROR: Cannot have both warp types";
|
||||
ed.notedelay=45;
|
||||
}
|
||||
ed.lclickdelay=1;
|
||||
}
|
||||
else if(ed.drawmode==15) //Crewmate
|
||||
|
|
Loading…
Reference in a new issue