From 7c4a7e54f45c281fb6c3b246e7552fae591b6031 Mon Sep 17 00:00:00 2001 From: aurhat Date: Fri, 18 Jul 2014 17:42:41 +0200 Subject: [PATCH] Disable listdemos and getdemo in singleplayer --- source/src/client.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/src/client.cpp b/source/src/client.cpp index 9219b208..166e6ff9 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -820,6 +820,11 @@ void deleteservermap(char *mapname) string demosubpath; void getdemo(int *idx, char *dsp) { + if(!multiplayer(false)) + { + conoutf("%c3Getting demo from server is not available in singleplayer", CC); + return; + } if(dsp && dsp[0]) formatstring(demosubpath)("%s/", dsp); else copystring(demosubpath, ""); if(*idx<=0) conoutf(_("getting demo...")); @@ -829,6 +834,11 @@ void getdemo(int *idx, char *dsp) void listdemos() { + if(!multiplayer(false)) + { + conoutf("%c3Listing demos from server is not available in singleplayer", CC); + return; + } conoutf(_("listing demos...")); addmsg(SV_LISTDEMOS, "r"); }