brbrbrcoommit
This commit is contained in:
parent
cf0e97e144
commit
250118d51c
4 changed files with 7 additions and 7 deletions
|
@ -252,12 +252,12 @@ namespace ZoFo.GameCore
|
|||
else if (update is UpdateGameEnded)
|
||||
{
|
||||
GameEnd();
|
||||
}
|
||||
else if (update is UpdatePlayerParametrs && update.IdEntity == myPlayer.Id) //aaa
|
||||
}
|
||||
else if (update is UpdatePlayerParametrs && myPlayer !=null && update.IdEntity == myPlayer.Id) //aaa
|
||||
{
|
||||
UpdatePlayerHealth(update as UpdatePlayerParametrs);
|
||||
}
|
||||
else if (update is UpdateLoot && update.IdEntity == myPlayer.Id)//aaa
|
||||
else if (update is UpdateLoot && myPlayer != null && update.IdEntity == myPlayer.Id)//aaa
|
||||
{
|
||||
if ((update as UpdateLoot).quantity == 0)
|
||||
{
|
||||
|
|
|
@ -136,8 +136,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
|
||||
if (sendedData.Count != 0)
|
||||
{
|
||||
|
||||
|
||||
for (int i = 0; i < clientsEP.Count; i++)
|
||||
{
|
||||
foreach (Datagramm Dgramm in sendedData.Where(x => x.PlayerId == i+1))
|
||||
|
|
|
@ -10,7 +10,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
|||
public class UpdateCreatePlayer : UpdateData
|
||||
{
|
||||
public int PlayerId { get; set; }
|
||||
public SerializableVector2 position { get; set; }
|
||||
public UpdateCreatePlayer()
|
||||
{
|
||||
isImportant = true;
|
||||
|
|
|
@ -71,7 +71,10 @@ namespace ZoFo.GameCore
|
|||
if (players.Count > 0)
|
||||
{
|
||||
UpdateInput data = updateData as UpdateInput;
|
||||
players[data.PlayerId - 1].HandleNewInput(data);
|
||||
if (data.PlayerId > 0)
|
||||
{
|
||||
players[data.PlayerId - 1].HandleNewInput(data);
|
||||
}
|
||||
}
|
||||
//TODO id instead of 0
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue