Safety measures: disallow using netevent when not in a level

This commit is contained in:
ZZYZX 2017-02-06 16:14:18 +02:00
parent 52d9077477
commit b23937c924

View file

@ -1089,11 +1089,17 @@ CCMD(event)
CCMD(netevent) 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(); int argc = argv.argc();
if (argc < 2 || argc > 5) if (argc < 2 || argc > 5)
{ {
Printf("Usage: event <name> [arg1] [arg2] [arg3]\n"); Printf("Usage: netevent <name> [arg1] [arg2] [arg3]\n");
} }
else else
{ {