Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2016-07-18 20:35:47 +0200
committerStijn Buys <ingar@osirion.org>2016-07-18 20:35:47 +0200
commit1d99e86e3197ed7594d9ef8c1c350a6a60e7bce0 (patch)
tree091e82af2f81e878d20367eba4f5c66430950619 /src/client
parent6b43f8c5ee2d33e43cc8a270c7d121e2ac93ddff (diff)
Disable quickload in multiplayer games.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.cc5
-rw-r--r--src/client/savegamemenu.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 5ab5a0b..d364d50 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -19,6 +19,7 @@
#include "client/soundext.h"
#include "client/savegamemenu.h"
#include "core/core.h"
+#include "core/gameserver.h"
#include "core/loader.h"
#include "core/zone.h"
#include "filesystem/filesystem.h"
@@ -702,6 +703,10 @@ void Client::func_loadgame(std::string const &args)
aux::to_label(savename);
if (!savename.size()) {
+ // only quickload in local games
+ if (!core::server() || !core::server()->module()) {
+ return;
+ }
savename.assign("quicksave");
}
SaveGameMenu::loadgame(savename);
diff --git a/src/client/savegamemenu.cc b/src/client/savegamemenu.cc
index 2ba038f..fbb8cd5 100644
--- a/src/client/savegamemenu.cc
+++ b/src/client/savegamemenu.cc
@@ -586,8 +586,9 @@ void SaveGameMenu::savescreenshot(std::string savename)
void SaveGameMenu::savegame(std::string savename, const std::string & description)
{
- if (!core::server() || !core::server()->module())
+ if (!core::server() || !core::server()->module()) {
return;
+ }
if (!core::localcontrol()) {
return;