mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-22 11:41:08 +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)
|
void DoPanning(void)
|
||||||
{
|
{
|
||||||
double nx, ny;
|
int nx, ny;
|
||||||
int i;
|
int i;
|
||||||
sectortype* sectp;
|
sectortype* sectp;
|
||||||
walltype* wallp;
|
walltype* wallp;
|
||||||
|
@ -2870,8 +2870,8 @@ void DoPanning(void)
|
||||||
{
|
{
|
||||||
sectp = actor->sector();
|
sectp = actor->sector();
|
||||||
|
|
||||||
nx = actor->vel.X * actor->spr.angle.Cos();
|
nx = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Cos() * 0.25);
|
||||||
ny = actor->vel.X * actor->spr.angle.Sin();
|
ny = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Sin() * 0.25);
|
||||||
|
|
||||||
sectp->addfloorxpan((float)nx);
|
sectp->addfloorxpan((float)nx);
|
||||||
sectp->addfloorypan((float)ny);
|
sectp->addfloorypan((float)ny);
|
||||||
|
@ -2882,8 +2882,8 @@ void DoPanning(void)
|
||||||
{
|
{
|
||||||
sectp = actor->sector();
|
sectp = actor->sector();
|
||||||
|
|
||||||
nx = actor->vel.X * actor->spr.angle.Cos();
|
nx = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Cos() * 0.25);
|
||||||
ny = actor->vel.X * actor->spr.angle.Sin();
|
ny = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Sin() * 0.25);
|
||||||
|
|
||||||
sectp->addceilingxpan((float)nx);
|
sectp->addceilingxpan((float)nx);
|
||||||
sectp->addceilingypan((float)ny);
|
sectp->addceilingypan((float)ny);
|
||||||
|
@ -2894,8 +2894,8 @@ void DoPanning(void)
|
||||||
{
|
{
|
||||||
wallp = actor->tempwall;
|
wallp = actor->tempwall;
|
||||||
|
|
||||||
nx = actor->vel.X * actor->spr.angle.Cos();
|
nx = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Cos() * 0.25);
|
||||||
ny = actor->vel.X * actor->spr.angle.Sin();
|
ny = xs_CRoundToInt(actor->vel.X * actor->spr.angle.Sin() * 0.25);
|
||||||
|
|
||||||
wallp->addxpan((float)nx);
|
wallp->addxpan((float)nx);
|
||||||
wallp->addypan((float)ny);
|
wallp->addypan((float)ny);
|
||||||
|
|
Loading…
Reference in a new issue