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 OnConnectToDF() { enabled = true; regionMaps = DFConnection.Instance.PopRegionMapUpdate(); worldMap = DFConnection.Instance.PopWorldMapUpdate(); if (regionMaps != null && worldMap != null) { GenerateRegionMeshes(); } if (worldMap != null) { CopyFromRemote(worldMap); } }
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 && worldMap != null) { GenerateRegionMeshes(); } if (worldMap != null) { CopyFromRemote(worldMap); UpdateRegionPositions(worldMap); } //worldMap = DFConnection.Instance.PopWorldMapUpdate(); //if (worldMap != null) // if (madeTerrain) // CopyClouds(worldMap); // else // 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); } } }