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:
Regalis
2015-07-09 20:33:53 +03:00
parent 2254585dac
commit 257835e609
25 changed files with 279 additions and 204 deletions

View File

@@ -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;
}