Send the designated team number as extra data in the order

This commit is contained in:
abcdefg30
2019-04-13 16:12:19 +02:00
committed by Paul Chote
parent 991093df81
commit 9a84ccdd1d
4 changed files with 33 additions and 8 deletions

View File

@@ -195,9 +195,12 @@ namespace OpenRA
// Named constructors for Orders.
// Now that Orders are resolved by individual Actors, these are weird; you unpack orders manually, but not pack them.
public static Order Chat(bool team, string text)
public static Order Chat(bool team, string text, int teamNumber = 0)
{
return new Order(team ? "TeamChat" : "Chat", null, false) { IsImmediate = true, TargetString = text };
if (!team)
return new Order("Chat", null, false) { IsImmediate = true, TargetString = text };
return new Order("TeamChat", null, false) { IsImmediate = true, TargetString = text, ExtraData = (uint)teamNumber };
}
public static Order HandshakeResponse(string text)