Allow MessageQuit to be a valid command

This commit is contained in:
wizzard 2004-02-01 02:17:21 +00:00
parent 9a9822ff39
commit 713ba012fc

View file

@ -898,7 +898,7 @@ global void NetworkEvent(void)
NetworkLastFrame[player] = FrameCounter;
// Place in network in
switch (packet->Header.Type[i]) {
switch (packet->Header.Type[i] & 0x7F) {
case MessageExtendedCommand:
// FIXME: ensure the sender is part of the command
allowed = 1;
@ -907,6 +907,10 @@ global void NetworkEvent(void)
// Sync does not matter
allowed = 1;
break;
case MessageQuit:
// FIXME: ensure it's from the right player
allowed = 1;
break;
default:
if (UnitSlots[ntohs(nc->Unit)]->Player->Player == player ||
PlayersTeamed(player, UnitSlots[ntohs(nc->Unit)]->Player->Player)) {