void CmdProvideRotationsToServer(Quaternion playerRot) { syncPlayerRotation = playerRot; foreach (NetworkConnection nc in ((PlanetsNetworkManager)PlanetsNetworkManager.singleton).getUpdateListeners(updateAll)){ #if UNITY_5_4_OR_NEWER TargetUpdateRotation(nc, playerRot); #else UpdateRotTurret ur = new UpdateRotTurret(); ur.netId = nIdentity.netId; ur.rot = playerRot; NetworkServer.SendToClient(nc.connectionId, Msgs.updateRotTurret, ur); #endif } }
public void TargetUpdateRot(UpdateRotTurret ur) { syncPlayerRotation = ur.rot; }