diff options
Diffstat (limited to 'src/core/commandbuffer.cc')
-rw-r--r-- | src/core/commandbuffer.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/commandbuffer.cc b/src/core/commandbuffer.cc index c381d38..7f1cda0 100644 --- a/src/core/commandbuffer.cc +++ b/src/core/commandbuffer.cc @@ -32,7 +32,17 @@ void exec(const char *text) Func f = func::find(cmdname); if (f) { // function exists, execute it - f(cmdstream); + if (f->flags && func::Game) { + // it's a game function + if (connected()) { + GameFuncPtr function = (GameFuncPtr) f->ptr; + function(localplayer, cmdstream); + } + } else { + // it's a normal function + FuncPtr function = (FuncPtr) f->ptr; + function(cmdstream); + } return; } |