mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- had to partially revert the math for panning to integers.
The higher precision causes panning speed differences that are visible.
This commit is contained in:
parent
78c6888973
commit
50668e45dd
1 changed files with 7 additions and 7 deletions
|
@ -2860,7 +2860,7 @@ short AnimSetVelAdj(short anim_ndx, double vel_adj)
|
|||
|
||||
void DoPanning(void)
|
||||
{
|
||||
double nx, ny;
|
||||
int nx, ny;
|
||||
int i;
|
||||
sectortype* sectp;
|
||||
walltype* wallp;
|
||||
|
@ -2870,8 +2870,8 @@ void DoPanning(void)
|
|||
{
|
||||
sectp = actor->sector();
|
||||
|
||||
nx = actor->vel.X * actor->spr.angle.Cos();
|
||||
ny = actor->vel.X * actor->spr.angle.Sin();
|
||||
nx = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Cos() * 0.25);
|
||||
ny = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Sin() * 0.25);
|
||||
|
||||
sectp->addfloorxpan((float)nx);
|
||||
sectp->addfloorypan((float)ny);
|
||||
|
@ -2882,8 +2882,8 @@ void DoPanning(void)
|
|||
{
|
||||
sectp = actor->sector();
|
||||
|
||||
nx = actor->vel.X * actor->spr.angle.Cos();
|
||||
ny = actor->vel.X * actor->spr.angle.Sin();
|
||||
nx = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Cos() * 0.25);
|
||||
ny = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Sin() * 0.25);
|
||||
|
||||
sectp->addceilingxpan((float)nx);
|
||||
sectp->addceilingypan((float)ny);
|
||||
|
@ -2894,8 +2894,8 @@ void DoPanning(void)
|
|||
{
|
||||
wallp = actor->tempwall;
|
||||
|
||||
nx = actor->vel.X * actor->spr.angle.Cos();
|
||||
ny = actor->vel.X * actor->spr.angle.Sin();
|
||||
nx = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Cos() * 0.25);
|
||||
ny = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Sin() * 0.25);
|
||||
|
||||
wallp->addxpan((float)nx);
|
||||
wallp->addypan((float)ny);
|
||||
|
|
Loading…
Reference in a new issue