Added playsim event (netevent CCMD)

This commit is contained in:
ZZYZX 2017-02-06 16:02:44 +02:00
commit 52d9077477
4 changed files with 33 additions and 1 deletions

View file

@ -64,6 +64,7 @@
#include "a_keys.h"
#include "intermission/intermission.h"
#include "g_levellocals.h"
#include "events.h"
EXTERN_CVAR (Int, disableautosave)
EXTERN_CVAR (Int, autosavecount)
@ -2678,6 +2679,17 @@ void Net_DoCommand (int type, BYTE **stream, int player)
G_ChangeLevel(NULL, 0, 0);
break;
case DEM_NETEVENT:
{
FString ename = ReadString(stream);
int argn = ReadByte(stream);
int arg[3] = { 0, 0, 0 };
for (int i = 0; i < argn; i++)
arg[i] = ReadLong(stream);
E_Console(player, ename, arg[0], arg[1], arg[2]);
}
break;
default:
I_Error ("Unknown net command: %d", type);
break;