Disable Quicksave during multiplayer, since the feature is not implemented and triggering it can crash the turnmanager.
Differential Revision: https://code.wildfiregames.com/D2584 Comments By: Stan This was SVN commit r23429.
This commit is contained in:
parent
ed0a3f4290
commit
c50a621cea
@ -24,11 +24,11 @@
|
||||
</object>
|
||||
|
||||
<object hotkey="quicksave">
|
||||
<action on="Press">Engine.QuickSave(getSavedGameData());</action>
|
||||
<action on="Press">if (!g_IsNetworked) Engine.QuickSave(getSavedGameData());</action>
|
||||
</object>
|
||||
|
||||
<object hotkey="quickload">
|
||||
<action on="Press">Engine.QuickLoad();</action>
|
||||
<action on="Press">if (!g_IsNetworked) Engine.QuickLoad();</action>
|
||||
</object>
|
||||
|
||||
<object hotkey="session.kill">
|
||||
|
@ -54,7 +54,9 @@ void JSI_SavedGame::SaveGamePrefix(ScriptInterface::CxPrivate* pCxPrivate, const
|
||||
|
||||
void JSI_SavedGame::QuickSave(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), JS::HandleValue GUIMetadata)
|
||||
{
|
||||
if (g_Game)
|
||||
if (g_NetServer || g_NetClient)
|
||||
LOGERROR("Can't store quicksave during multiplayer!");
|
||||
else if (g_Game)
|
||||
g_Game->GetTurnManager()->QuickSave(GUIMetadata);
|
||||
else
|
||||
LOGERROR("Can't store quicksave if game is not running!");
|
||||
@ -62,7 +64,9 @@ void JSI_SavedGame::QuickSave(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), JS
|
||||
|
||||
void JSI_SavedGame::QuickLoad(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||
{
|
||||
if (g_Game)
|
||||
if (g_NetServer || g_NetClient)
|
||||
LOGERROR("Can't load quicksave during multiplayer!");
|
||||
else if (g_Game)
|
||||
g_Game->GetTurnManager()->QuickLoad();
|
||||
else
|
||||
LOGERROR("Can't load quicksave if game is not running!");
|
||||
|
Loading…
Reference in New Issue
Block a user