Merge branch 'AddPlayers' of github.com:progtime-net/ZoFo into AddPlayers
This commit is contained in:
commit
4dc18ea64e
1 changed files with 6 additions and 4 deletions
|
@ -261,10 +261,12 @@ namespace ZoFo.GameCore
|
|||
}
|
||||
else if (update is UpdateCreatePlayer)
|
||||
{
|
||||
Vector2 pos = (update as UpdateCreatePlayer).position.GetVector2();
|
||||
Player player = new Player(pos);
|
||||
myPlayer = player;
|
||||
players.Add(player);
|
||||
UpdateCreatePlayer ucp = (UpdateCreatePlayer)update;
|
||||
if (networkManager.PlayerId == ucp.PlayerId)
|
||||
{
|
||||
myPlayer = (Player)FindEntityById(ucp.IdEntity);
|
||||
players.Add(myPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue