Exemple #1
0
 void Update()
 {
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap   = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null)
     {
         GenerateRegionMeshes();
         GenerateMesh();
     }
     if (worldMap != null)
     {
         if (DFConnection.Instance.HasWorldMapPositionChanged())
         {
             CopyFromRemote(worldMap);
             UpdateRegionPositions(worldMap);
         }
         else
         {
             if (GameSettings.Instance.rendering.drawClouds)
             {
                 CopyClouds(worldMap);
             }
         }
     }
 }
Exemple #2
0
 void OnConnectToDF()
 {
     enabled    = true;
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap   = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null && worldMap != null)
     {
         GenerateRegionMeshes();
     }
     if (worldMap != null)
     {
         CopyFromRemote(worldMap);
     }
 }
Exemple #3
0
 void Update()
 {
     worldMap = DFConnection.Instance.PopWorldMapUpdate();
     if (worldMap != null)
     {
         if (madeTerrain)
         {
             CopyClouds(worldMap);
         }
         else
         {
             CopyFromRemote(worldMap, DFConnection.Instance.NetMapInfo);
         }
     }
 }
Exemple #4
0
 void Update()
 {
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null && worldMap != null)
     {
         GenerateRegionMeshes();
     }
     if (worldMap != null)
     {
         CopyFromRemote(worldMap);
         UpdateRegionPositions(worldMap);
     }
     //worldMap = DFConnection.Instance.PopWorldMapUpdate();
     //if (worldMap != null)
     //    if (madeTerrain)
     //        CopyClouds(worldMap);
     //    else
     //        CopyFromRemote(worldMap);
 }
Exemple #5
0
 void OnConnectToDF()
 {
     enabled = true;
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null && worldMap != null)
     {
         GenerateRegionMeshes();
     }
     if (worldMap != null)
     {
         CopyFromRemote(worldMap);
     }
 }
 // Pop a world map update. The map doesn't change, but the clouds do.
 public RemoteFortressReader.WorldMap PopWorldMapUpdate()
 {
     RemoteFortressReader.WorldMap result = null;
     if (Monitor.TryEnter(worldMapLock))
         try
         {
             result = _netWorldMap;
             _netWorldMap = null;
         }
         finally
         {
             Monitor.Exit(worldMapLock);
         }
     return result;
 }
 void Update()
 {
     worldMap = DFConnection.Instance.PopWorldMapUpdate();
     if (worldMap != null)
         if (madeTerrain)
             CopyClouds(worldMap);
         else
             CopyFromRemote(worldMap, DFConnection.Instance.NetMapInfo);
 }
 void Update()
 {
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null)
     {
         GenerateRegionMeshes();
         GenerateMesh();
     }
     if (worldMap != null)
     {
         if (DFConnection.Instance.HasWorldMapPositionChanged())
         {
             CopyFromRemote(worldMap);
             UpdateRegionPositions(worldMap);
         }
         else
         {
             if(GameSettings.Instance.rendering.drawClouds)
                 CopyClouds(worldMap);
         }
     }
 }
 void Update()
 {
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null && worldMap != null)
     {
         GenerateRegionMeshes();
     }
     if (worldMap != null)
     {
         if (DFConnection.Instance.HasWorldMapPositionChanged())
         {
             CopyFromRemote(worldMap);
             UpdateRegionPositions(worldMap);
         }
         else
         {
             CopyClouds(worldMap);
         }
     }
 }