From 1d99e86e3197ed7594d9ef8c1c350a6a60e7bce0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 18 Jul 2016 20:35:47 +0200 Subject: Disable quickload in multiplayer games. --- src/client/client.cc | 5 +++++ src/client/savegamemenu.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3