From b23937c924ef29ea8e0c07c60fe16d99f9f15a89 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Mon, 6 Feb 2017 16:14:18 +0200 Subject: [PATCH] Safety measures: disallow using netevent when not in a level --- src/events.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/events.cpp b/src/events.cpp index 17cec36858..95a5af5879 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -1089,11 +1089,17 @@ CCMD(event) CCMD(netevent) { + if (gamestate != GS_LEVEL/* && gamestate != GS_TITLELEVEL*/) // not sure if this should work in title level, but probably not, because this is for actual playing + { + Printf("netevent cannot be used outside of a map.\n"); + return; + } + int argc = argv.argc(); if (argc < 2 || argc > 5) { - Printf("Usage: event [arg1] [arg2] [arg3]\n"); + Printf("Usage: netevent [arg1] [arg2] [arg3]\n"); } else {