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

Prevent deleting saves in special or customs

This prevents deleting telesaves and quicksaves in special modes and
custom levels.

Otherwise, rolling credits in a custom level would still delete the main
game quicksave.
This commit is contained in:
Misa 2023-05-22 12:14:01 -07:00
parent 41126c2097
commit d841612be2

View file

@ -6996,6 +6996,11 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
void Game::deletequick(void) void Game::deletequick(void)
{ {
if (inspecial() || map.custommode)
{
return;
}
if( !FILESYSTEM_delete( "saves/qsave.vvv" ) ) if( !FILESYSTEM_delete( "saves/qsave.vvv" ) )
vlog_error("Error deleting saves/qsave.vvv"); vlog_error("Error deleting saves/qsave.vvv");
else else
@ -7004,6 +7009,11 @@ void Game::deletequick(void)
void Game::deletetele(void) void Game::deletetele(void)
{ {
if (inspecial() || map.custommode)
{
return;
}
if( !FILESYSTEM_delete( "saves/tsave.vvv" ) ) if( !FILESYSTEM_delete( "saves/tsave.vvv" ) )
vlog_error("Error deleting saves/tsave.vvv"); vlog_error("Error deleting saves/tsave.vvv");
else else