Giving crew members an ID card with clearances based on spawnpoint, level collision bugfixes, level exit/enter "shafts", moar entity ID bugfixes
This commit is contained in:
@@ -374,6 +374,7 @@ namespace Subsurface.Networking
|
||||
msg.Write((byte)PacketTypes.PlayerLeft);
|
||||
|
||||
Client.SendMessage(msg, NetDeliveryMethod.ReliableUnordered);
|
||||
Client.Shutdown("");
|
||||
}
|
||||
|
||||
public void SendCharacterData()
|
||||
@@ -411,6 +412,11 @@ namespace Subsurface.Networking
|
||||
string jobName = inc.ReadString();
|
||||
JobPrefab jobPrefab = JobPrefab.List.Find(jp => jp.Name == jobName);
|
||||
|
||||
if (inc.Position > inc.LengthBits)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
CharacterInfo ch = new CharacterInfo("Content/Characters/Human/human.xml", newName, isFemale ? Gender.Female : Gender.Male, jobPrefab);
|
||||
ch.HeadSpriteId = headSpriteID;
|
||||
|
||||
@@ -433,7 +439,7 @@ namespace Subsurface.Networking
|
||||
character.ID = ID;
|
||||
character.Inventory.ID = inventoryID;
|
||||
|
||||
character.GiveJobItems();
|
||||
character.GiveJobItems(closestWaypoint);
|
||||
|
||||
return character;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user