Show bad team message only to server owner

This commit is contained in:
Benau 2018-10-25 15:12:18 +08:00
parent d731a658d8
commit 7902431abe

View File

@ -842,11 +842,14 @@ void ServerLobby::startSelection(const Event *event)
red_blue.first + red_blue.second != 1)
{
Log::warn("ServerLobby", "Bad team choosing.");
NetworkString* bt = getNetworkString();
bt->setSynchronous(true);
bt->addUInt8(LE_BAD_TEAM);
sendMessageToPeers(bt, true/*reliable*/);
delete bt;
if (event)
{
NetworkString* bt = getNetworkString();
bt->setSynchronous(true);
bt->addUInt8(LE_BAD_TEAM);
event->getPeer()->sendPacket(bt, true/*reliable*/);
delete bt;
}
return;
}
}