Commit 2c465645 authored by Ben W's avatar Ben W
Browse files

Fixed player not being synced any more

parent 472a95c3
......@@ -235,7 +235,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
Prefab: {fileID: 5347128353891683361}
ClientAuth: 0
Sync: 0
Sync: 1
_threshold: 0.1
IsOwner: 0
OwnerID: 0
......
......@@ -83,7 +83,8 @@ class NetworkedBehaviour : MonoBehaviour
public virtual void Update()
{
if (!ClientAuth && Sync == SyncType.None)
if ((!ClientAuth && !NetworkManager.IsServer) ||
Sync == SyncType.None)
return;
SyncTransform();
}
......@@ -122,6 +123,7 @@ class NetworkedBehaviour : MonoBehaviour
writer.Write(_lastRotation.z);
NetworkManager.SendMessage(NetworkTags.MoveObject, writer, SendMode.Unreliable);
Debug.Log("Sent MoveObject Message");
}
}
}
......@@ -130,7 +132,7 @@ class NetworkedBehaviour : MonoBehaviour
{
if (ClientAuth && !NetworkManager.IsServer)
return;
Debug.Log($"Received MoveObject Message");
_lastPosition = reader.ReadVector3();
_lastRotation = reader.ReadVector3();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment