WIP position syncing

This commit is contained in:
Regalis
2016-10-17 22:28:55 +03:00
parent 0cafc674dd
commit b68eeda8a8
5 changed files with 207 additions and 79 deletions

View File

@@ -705,13 +705,14 @@ namespace Barotrauma.Networking
lastSentChatMsgID = inc.ReadUInt32();
break;
case ServerNetObject.CHARACTER_POSITION:
bool dead = inc.ReadBoolean();
//bool dead = inc.ReadBoolean();
Character.ClientReadStatic(inc);
inc.ReadPadBits();
if (Character.Controlled != null)
{
if (dead && !Character.Controlled.IsDead)
Character.Controlled.Kill(CauseOfDeath.Damage);
}
//if (Character.Controlled != null)
//{
// if (dead && !Character.Controlled.IsDead)
// Character.Controlled.Kill(CauseOfDeath.Damage);
//}
break;
case ServerNetObject.CHAT_MESSAGE:
ChatMessage.ClientRead(inc);