mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-22 08:49:46 +01:00
Fix editor unexpectedly quitting after failed save-and-quit
Also simplified away the success variable.
This commit is contained in:
parent
ae45391ec0
commit
3bb4eefaff
1 changed files with 4 additions and 5 deletions
|
@ -4050,14 +4050,14 @@ void editorinput()
|
|||
else if(ed.savemod)
|
||||
{
|
||||
std::string savestring=ed.filename+".vvvvvv";
|
||||
bool success = ed.save(savestring);
|
||||
if (success)
|
||||
if (ed.save(savestring))
|
||||
{
|
||||
ed.note="[ Saved map: " + ed.filename+ ".vvvvvv]";
|
||||
}
|
||||
else
|
||||
{
|
||||
ed.note="[ ERROR: Could not save level! ]";
|
||||
ed.saveandquit = false;
|
||||
}
|
||||
ed.notedelay=45;
|
||||
ed.savemod=false;
|
||||
|
@ -4065,7 +4065,7 @@ void editorinput()
|
|||
ed.shiftmenu=false;
|
||||
ed.shiftkey=false;
|
||||
|
||||
if(ed.saveandquit && success)
|
||||
if(ed.saveandquit)
|
||||
{
|
||||
//quit editor
|
||||
graphics.fademode = 2;
|
||||
|
@ -4074,8 +4074,7 @@ void editorinput()
|
|||
else if(ed.loadmod)
|
||||
{
|
||||
std::string loadstring=ed.filename+".vvvvvv";
|
||||
bool success = ed.load(loadstring);
|
||||
if (success)
|
||||
if (ed.load(loadstring))
|
||||
{
|
||||
ed.note="[ Loaded map: " + ed.filename+ ".vvvvvv]";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue