- Modified item buying logic: selected items are purchased immediately without having to click the "buy" button, and they stay in the list of purchased items until the round is started. (-> It's possible to see which items have been purchased and cancel purchases).
- Clients can be given a permission to manage the campaign (atm selecting which location to head towards and buying items). - Syncing cargomanager state with clients. - Misc fixes.
This commit is contained in:
@@ -1312,6 +1312,24 @@ namespace Barotrauma.Networking
|
||||
client.SendMessage(msg, NetDeliveryMethod.ReliableUnordered);
|
||||
}
|
||||
|
||||
public void SendCampaignState()
|
||||
{
|
||||
MultiplayerCampaign campaign = GameMain.GameSession.GameMode as MultiplayerCampaign;
|
||||
if (campaign == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Failed send campaign state to the server (no campaign active).\n" + Environment.StackTrace);
|
||||
return;
|
||||
}
|
||||
|
||||
NetOutgoingMessage msg = client.CreateMessage();
|
||||
msg.Write((byte)ClientPacketHeader.SERVER_COMMAND);
|
||||
msg.Write((byte)ClientPermissions.ManageCampaign);
|
||||
campaign.ClientWrite(msg);
|
||||
msg.Write((byte)ServerNetObject.END_OF_MESSAGE);
|
||||
|
||||
client.SendMessage(msg, NetDeliveryMethod.ReliableUnordered);
|
||||
}
|
||||
|
||||
public void RequestRoundEnd()
|
||||
{
|
||||
NetOutgoingMessage msg = client.CreateMessage();
|
||||
|
||||
Reference in New Issue
Block a user