private static void OnChangeFovSuccess(MySyncCameraBlock syncObject, ref ChangeFovMsg message, MyNetworkClient sender) { //Don't change fov while someone is using it if (!syncObject.Entity.IsActive) { syncObject.Entity.OnChangeFov(message.Fov); } }
public void SendNewFov(float fov) { var msg = new ChangeFovMsg(); msg.EntityId = Entity.EntityId; msg.Fov = fov; Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Request); }
private static void OnChangeFovRequest(MySyncCameraBlock syncObject, ref ChangeFovMsg message, MyNetworkClient sender) { Sync.Layer.SendMessageToAllAndSelf(ref message, MyTransportMessageEnum.Success); }