mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Really fix concave relative slopes.
git-svn-id: https://svn.eduke32.com/eduke32@1335 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9241ab974a
commit
e48c4c2c87
1 changed files with 5 additions and 6 deletions
|
@ -1651,13 +1651,8 @@ static int32_t polymer_updatesector(int16_t sectnum)
|
|||
// relative texturing
|
||||
if (curstat & 64)
|
||||
{
|
||||
// absolute distance for walls "behind" the first wall (concave sectors)
|
||||
xpancoef = wal->x - wall[sec->wallptr].x;
|
||||
if (xpancoef < 0)
|
||||
xpancoef = -xpancoef;
|
||||
ypancoef = wall[sec->wallptr].y - wal->y;
|
||||
if (ypancoef < 0)
|
||||
ypancoef = -ypancoef;
|
||||
|
||||
tex = xpancoef * secangsin + ypancoef * secangcos;
|
||||
tey = xpancoef * secangcos - ypancoef * secangsin;
|
||||
|
@ -1669,7 +1664,11 @@ static int32_t polymer_updatesector(int16_t sectnum)
|
|||
if ((curstat & (2+64)) == (2+64))
|
||||
{
|
||||
heidiff = curbuffer[(i*5)+1] - curbuffer[1];
|
||||
tey = sqrt((tey * tey) + (heidiff * heidiff));
|
||||
// don't forget the sign, tey could be negative with concave sectors
|
||||
if (tey >= 0)
|
||||
tey = sqrt((tey * tey) + (heidiff * heidiff));
|
||||
else
|
||||
tey = -sqrt((tey * tey) + (heidiff * heidiff));
|
||||
}
|
||||
|
||||
if (curstat & 4)
|
||||
|
|
Loading…
Reference in a new issue