Added a way to tell apart console-executed events from code-executed SendNetworkEvent

This commit is contained in:
ZZYZX 2017-03-06 11:25:30 +02:00 committed by Christoph Oelckers
commit 21ecd714ec
4 changed files with 24 additions and 12 deletions

View file

@ -2676,7 +2676,8 @@ void Net_DoCommand (int type, BYTE **stream, int player)
int arg[3] = { 0, 0, 0 };
for (int i = 0; i < 3; i++)
arg[i] = ReadLong(stream);
E_Console(player, s, arg[0], arg[1], arg[2]);
bool manual = ReadByte(stream);
E_Console(player, s, arg[0], arg[1], arg[2], manual);
}
break;
@ -2727,7 +2728,7 @@ void Net_SkipCommand (int type, BYTE **stream)
break;
case DEM_NETEVENT:
skip = strlen((char *)(*stream)) + 14;
skip = strlen((char *)(*stream)) + 15;
break;
case DEM_SUMMON2: