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

Fix editor unexpectedly quitting after failed save-and-quit

Also simplified away the success variable.
This commit is contained in:
Dav999-v 2020-06-02 15:10:23 +02:00 committed by Ethan Lee
parent ae45391ec0
commit 3bb4eefaff

View file

@ -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]";
}