Avoid problem with duplicate spawns

This commit is contained in:
Drew DeVault 2015-05-13 16:51:51 -06:00
parent 605cbbc2a0
commit dfa3132759

View File

@ -172,6 +172,8 @@ namespace TrueCraft
private void SendEntityToClient(RemoteClient client, IEntity entity)
{
if (entity.EntityID == -1)
return; // We haven't finished setting this entity up yet
client.Log("Spawning entity {0} ({1}) at {2}", entity.EntityID, entity.GetType().Name, (Coordinates3D)entity.Position);
RemoteClient spawnedClient = null;
if (entity is PlayerEntity)