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>
|
||||||
|
|
||||||
<object hotkey="quicksave">
|
<object hotkey="quicksave">
|
||||||
<action on="Press">Engine.QuickSave(getSavedGameData());</action>
|
<action on="Press">if (!g_IsNetworked) Engine.QuickSave(getSavedGameData());</action>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
<object hotkey="quickload">
|
<object hotkey="quickload">
|
||||||
<action on="Press">Engine.QuickLoad();</action>
|
<action on="Press">if (!g_IsNetworked) Engine.QuickLoad();</action>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
<object hotkey="session.kill">
|
<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)
|
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);
|
g_Game->GetTurnManager()->QuickSave(GUIMetadata);
|
||||||
else
|
else
|
||||||
LOGERROR("Can't store quicksave if game is not running!");
|
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))
|
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();
|
g_Game->GetTurnManager()->QuickLoad();
|
||||||
else
|
else
|
||||||
LOGERROR("Can't load quicksave if game is not running!");
|
LOGERROR("Can't load quicksave if game is not running!");
|
||||||
|
Loading…
Reference in New Issue
Block a user