A curated forum for approved mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
- Posts: 16
- Joined: Sun May 10, 2020 2:08 pm
- Location: Dresden, Saxony, Germany
Hm. With Distant Terrain's improved Terrain setting, I'm getting some weird results in south-Dak'fron. Fast-Travelling to Lothten Orchard spawns me beneath the Terrain. Going from The Queen's Huntsman's Lodge and running South East for a while, I'll eventually see giant holes in the terrain. With the setting turned off, all is well. Quite bizarre.
- Posts: 2329
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Posts: 1400
- Joined: Mon Mar 23, 2015 8:31 am
thanks for investigating - this is indeed an easy fix - thanks for your efforts!Hazelnut wrote: ↑Thu Oct 10, 2019 6:33 pmI took a look and it's not due to the jobs update. I did track down the error to these lines 606-608 of ImprovedTerrainSampler.cs:
The array out of bounds happens when the mapPixelY becomes 500, so when multiplied by 1000 it's 500,000 which is the length of the array. Subtracting 1 from the map width and height values (as shown in the modified code above) stops the OOB but it may be that the actual mapPixelY/X need 1 subtracting for the array. I will leave that to you Nystul as I have no idea what this code is actually doing.
Code: Select all
int mapPixelX = Math.Max(0, Math.Min(mx + x - 2, WoodsFile.mapWidthValue -1)); int mapPixelY = Math.Max(0, Math.Min(my + y - 2, WoodsFile.mapHeightValue -1)); waterDistanceMap[x, y] = (float)Math.Sqrt(ImprovedWorldTerrain.MapDistanceSquaredFromWater[mapPixelY * WoodsFile.mapWidthValue + mapPixelX]);
update: there is a new version 2.6.1 with retro rendering mode support and map border fix in first post of this thread