Page 1 of 1

Slope tolerance problem

Posted: 06 Feb 2010, 14:18
by very_bad_soldier
Played yesterday a game of BA on LLTA Complex v2. The slope tolerance changed somehow so vehicles cannot leave the starting rectangle:
Image

Dunno, maybe related to engine changes? We played BA 7.04, so I dont think it is related to the mod.

Re: Slope tolerance problem

Posted: 06 Feb 2010, 14:21
by Beherith
Wheeee. I suspect that the slope map resolution changed.

Re: Slope tolerance problem

Posted: 06 Feb 2010, 15:47
by jK
Something like that:

There was a bug in the old code, so the slopemap always had 1/4 (0.5*width,0.5*height) of the size of the heightmap, but the old code just used 1 slope of the 4 to calculate the final slope it writes in the slopemap, so on very hard edges it was possible that it `missed` the edge. Because of this units were able to climb ~90degree cliffs (e.g. terraformed ones), also terrain at the edge of the map was always passable (totally independent of the slope).

Now it calculates all 4 slopes and runs a smooth function on the them:

Code: Select all

//! smooth it a bit, so small holes don't block huge tanks
const float lerp = maxslope / avgslope;
const float slope = maxslope * (1.0f - lerp) + avgslope * lerp;

Re: Slope tolerance problem

Posted: 06 Feb 2010, 21:34
by Argh
Because of this units were able to climb ~90degree cliffs (e.g. terraformed ones), also terrain at the edge of the map was always passable (totally independent of the slope).
That got fixed? Yay!