mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
Safety measures: disallow using netevent when not in a level
This commit is contained in:
parent
52d9077477
commit
b23937c924
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue