mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-02 09:02:35 +00:00
- Duke (RRRA): Fix potential issue originating from 1bc51a7367
where horizon might have needed adjustment to 0 but wouldn't have done so.
* Previously used to determine whether to apply a horizon adjustment on whether local variable `horiz` was 0 or not (since baseline horizon was 100). * For no particular reason, initalise `horiz` as FRACUNIT and process if it is not equal to one.
This commit is contained in:
parent
db419fd618
commit
b1536d8a0b
1 changed files with 4 additions and 4 deletions
|
@ -1714,7 +1714,7 @@ static void onMotorcycle(int snum, ESyncBits &actions)
|
|||
}
|
||||
}
|
||||
|
||||
double horiz = 0;
|
||||
double horiz = FRACUNIT;
|
||||
if (p->TurbCount)
|
||||
{
|
||||
if (p->TurbCount <= 1)
|
||||
|
@ -1756,7 +1756,7 @@ static void onMotorcycle(int snum, ESyncBits &actions)
|
|||
p->VBumpTarget = 0;
|
||||
p->moto_bump_fast = 0;
|
||||
}
|
||||
if (horiz != 0)
|
||||
if (horiz != FRACUNIT)
|
||||
{
|
||||
p->horizon.addadjustment(horiz - FixedToFloat(p->horizon.horiz.asq16()));
|
||||
}
|
||||
|
@ -2043,7 +2043,7 @@ static void onBoat(int snum, ESyncBits &actions)
|
|||
}
|
||||
}
|
||||
|
||||
double horiz = 0;
|
||||
double horiz = FRACUNIT;
|
||||
if (p->TurbCount)
|
||||
{
|
||||
if (p->TurbCount <= 1)
|
||||
|
@ -2085,7 +2085,7 @@ static void onBoat(int snum, ESyncBits &actions)
|
|||
p->VBumpTarget = 0;
|
||||
p->moto_bump_fast = 0;
|
||||
}
|
||||
if (horiz != 0)
|
||||
if (horiz != FRACUNIT)
|
||||
{
|
||||
p->horizon.addadjustment(horiz - FixedToFloat(p->horizon.horiz.asq16()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue