Slope tolerance problem

Slope tolerance problem

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Slope tolerance problem

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Slope tolerance problem

Post by Beherith »

Wheeee. I suspect that the slope map resolution changed.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Slope tolerance problem

Post 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;
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Slope tolerance problem

Post 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!
Post Reply

Return to “Help & Bugs”