summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f924968)
raw | patch | inline | side by side (parent: f924968)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 17 Sep 2017 07:46:41 +0000 (10:46 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 17 Sep 2017 07:47:13 +0000 (10:47 +0300) |
src/game/g_language.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history | |
src/game/g_saveload.pas | patch | blob | history |
index 7b74c3bbb9b2236886f58ec5aa96e93ae7897f18..01efd55df8cd8deb9effe213d5936268edfcbae3 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
I_MSG_UNBAN_OK,
I_MSG_UNBAN_FAIL,
+ I_MSG_BAD_SAVE_VERSION,
+
I_TEXTURE_ENDPIC,
I_VERSION,
('MSG UNBAN FAIL', 'Client %s not found in the ban list.',
'Êëèåíò %s íå ÷èñëèòñÿ â ñïèñêå çàáàíåíûõ.'),
+ ('MSG BAD SAVE VERSION', 'Cannot load saved game. Probably due to invalid save file version.',
+ 'Íå óäàëîñü çàãðóçèòü ñîõðàíåíèå. Ñêîðåå âåñåãî -- èç-çà íåâåðíîé âåðñèè ñîõðàíåíèÿ.'),
+
('TEXTURE ENDPIC', 'ENDGAME_EN',
'ENDGAME_RU'),
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 04f7331c5a00394ea29382d57da64604c4b7dbb4..05e32bf9d016ca27fca3883e4c2569a6f26d00d6 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
begin
TGUIEdit(TGUIMenu(g_GUI_GetWindow('LoadMenu').GetControl('mmLoadMenu')).GetControl('edSlot'+IntToStr(a))).Text := g_GetSaveName(a, valid);
TGUIEdit(TGUIMenu(g_GUI_GetWindow('LoadMenu').GetControl('mmLoadMenu')).GetControl('edSlot'+IntToStr(a))).Invalid := not valid;
- TGUIMenu(g_GUI_GetWindow('LoadMenu').GetControl('mmLoadMenu')).GetControl('edSlot'+IntToStr(a)).Enabled := valid;
+ //TGUIMenu(g_GUI_GetWindow('LoadMenu').GetControl('mmLoadMenu')).GetControl('edSlot'+IntToStr(a)).Enabled := valid;
end;
end;
if g_Game_IsNet then Exit;
a := StrToInt(Copy(Sender.Name, Length(Sender.Name), 1));
if g_LoadGame(a) then
+ begin
g_Game_PauseAllSounds(False)
+ end
else // Íå çàãðóçèëîñü - âîçâðàò â ìåíþ
+ begin
+ g_Console_Add(_lc[I_MSG_BAD_SAVE_VERSION], true);
g_GUI_GetWindow('LoadMenu').SetActive(g_GUI_GetWindow('LoadMenu').GetControl('mmLoadMenu'));
+ //g_ActiveWindow := nil;
+ end;
end;
procedure ProcSingle1Player();
index ad438f89174172171fa0d05b6b174cc982c5cd20..19bac6828f29869994a7e8e30e649846434d0878 100644 (file)
--- a/src/game/g_saveload.pas
+++ b/src/game/g_saveload.pas
e_WriteLog('LoadState Error: '+e.message, TMsgType.Warning);
{$IF DEFINED(D2F_DEBUG)}e_LogWritefln('stream error position: 0x%08x', [errpos], TMsgType.Warning);{$ENDIF}
gLoadGameMode := false;
- result := true;
+ result := false;
if not gameCleared then g_Game_Free();
{$IF DEFINED(D2F_DEBUG)}e_WriteStackTrace(e.message);{$ENDIF}
end;