- added an amount parameter to the 'drop' CCMD.

This commit is contained in:
Christoph Oelckers 2017-02-23 20:18:02 +01:00
commit e2d5a708f8
12 changed files with 45 additions and 27 deletions

View file

@ -2271,6 +2271,9 @@ void Net_DoCommand (int type, BYTE **stream, int player)
case DEM_INVDROP:
{
DWORD which = ReadLong (stream);
int amt = -1;
if (type == DEM_INVDROP) amt = ReadLong(stream);
if (gamestate == GS_LEVEL && !paused
&& players[player].playerstate != PST_DEAD)
@ -2288,7 +2291,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
}
else
{
players[player].mo->DropInventory (item);
players[player].mo->DropInventory (item, amt);
}
}
}
@ -2764,10 +2767,13 @@ void Net_SkipCommand (int type, BYTE **stream)
break;
case DEM_INVUSE:
case DEM_INVDROP:
skip = 4;
break;
case DEM_INVDROP:
skip = 8;
break;
case DEM_GENERICCHEAT:
case DEM_DROPPLAYER:
case DEM_FOV: