Unstable 1.2.1.0
This commit is contained in:
+15
-1
@@ -6,6 +6,14 @@ namespace Barotrauma
|
||||
{
|
||||
partial class CharacterCampaignData
|
||||
{
|
||||
#if DEBUG
|
||||
/// <summary>
|
||||
/// If enabled, client names must match the name of the character. Useful for testing the campaign with multiple clients running locally:
|
||||
/// without this, the clients would all get assigned the same character due to all of them having the same AccountId or Address.
|
||||
/// </summary>
|
||||
public static bool RequireClientNameMatch = false;
|
||||
#endif
|
||||
|
||||
public bool HasSpawned;
|
||||
|
||||
public bool HasItemData
|
||||
@@ -76,7 +84,7 @@ namespace Barotrauma
|
||||
{
|
||||
case "character":
|
||||
case "characterinfo":
|
||||
CharacterInfo = new CharacterInfo(subElement);
|
||||
CharacterInfo = new CharacterInfo(new ContentXElement(contentPackage: null, subElement));
|
||||
break;
|
||||
case "inventory":
|
||||
itemData = subElement;
|
||||
@@ -103,6 +111,12 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
#if DEBUG
|
||||
if (RequireClientNameMatch)
|
||||
{
|
||||
return ClientAddress == client.Connection.Endpoint.Address && client.Name == Name;
|
||||
}
|
||||
#endif
|
||||
return ClientAddress == client.Connection.Endpoint.Address;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user