mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- SW: Fix change in 1354d52c05
that accidentally caused minor loss of precision in the panel code.
This commit is contained in:
parent
9605e41f9f
commit
3f886ad818
1 changed files with 34 additions and 34 deletions
|
@ -1015,8 +1015,8 @@ pSwordSlide(PANEL_SPRITEp psp)
|
||||||
double nx, ny;
|
double nx, ny;
|
||||||
short vel_adj;
|
short vel_adj;
|
||||||
|
|
||||||
nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnSwordBlur(psp);
|
SpawnSwordBlur(psp);
|
||||||
vel_adj = 24;
|
vel_adj = 24;
|
||||||
|
@ -1041,8 +1041,8 @@ pSwordSlideDown(PANEL_SPRITEp psp)
|
||||||
double nx, ny;
|
double nx, ny;
|
||||||
short vel, vel_adj;
|
short vel, vel_adj;
|
||||||
|
|
||||||
nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnSwordBlur(psp);
|
SpawnSwordBlur(psp);
|
||||||
vel_adj = 20;
|
vel_adj = 20;
|
||||||
|
@ -1100,8 +1100,8 @@ pSwordSlideR(PANEL_SPRITEp psp)
|
||||||
double nx, ny;
|
double nx, ny;
|
||||||
short vel_adj;
|
short vel_adj;
|
||||||
|
|
||||||
nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnSwordBlur(psp);
|
SpawnSwordBlur(psp);
|
||||||
vel_adj = 24;
|
vel_adj = 24;
|
||||||
|
@ -1126,8 +1126,8 @@ pSwordSlideDownR(PANEL_SPRITEp psp)
|
||||||
double nx, ny;
|
double nx, ny;
|
||||||
short vel, vel_adj;
|
short vel, vel_adj;
|
||||||
|
|
||||||
nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnSwordBlur(psp);
|
SpawnSwordBlur(psp);
|
||||||
vel_adj = 24;
|
vel_adj = 24;
|
||||||
|
@ -2822,8 +2822,8 @@ pShotgunRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
int targetvel;
|
int targetvel;
|
||||||
|
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
if (psp->PlayerP->WpnShotgunType == 1)
|
if (psp->PlayerP->WpnShotgunType == 1)
|
||||||
targetvel = 890;
|
targetvel = 890;
|
||||||
|
@ -2855,8 +2855,8 @@ pShotgunRecoilDown(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pShotgunRecoilUp(PANEL_SPRITEp psp)
|
pShotgunRecoilUp(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -3333,8 +3333,8 @@ pRailSetRecoil(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pRailRecoilDown(PANEL_SPRITEp psp)
|
pRailRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -3361,8 +3361,8 @@ pRailRecoilDown(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pRailRecoilUp(PANEL_SPRITEp psp)
|
pRailRecoilUp(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -4227,8 +4227,8 @@ InitWeaponMicro(PLAYERp pp)
|
||||||
void
|
void
|
||||||
pMicroRecoilDown(PANEL_SPRITEp psp)
|
pMicroRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -4255,8 +4255,8 @@ pMicroRecoilDown(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pMicroRecoilUp(PANEL_SPRITEp psp)
|
pMicroRecoilUp(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -5241,8 +5241,8 @@ pGrenadeRecoilDown(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
// short picnum = psp->picndx;
|
// short picnum = psp->picndx;
|
||||||
|
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -5272,8 +5272,8 @@ pGrenadeRecoilDown(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pGrenadeRecoilUp(PANEL_SPRITEp psp)
|
pGrenadeRecoilUp(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
x += psp->vel * synctics * calcSinTableValue(NORM_ANGLE(psp->ang + 512)) / 64.;
|
||||||
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
y += psp->vel * synctics * -calcSinTableValue(psp->ang) / 64.;
|
||||||
|
@ -5303,8 +5303,8 @@ pGrenadeRecoilUp(PANEL_SPRITEp psp)
|
||||||
void
|
void
|
||||||
pGrenadePresent(PANEL_SPRITEp psp)
|
pGrenadePresent(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
double x = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
double x = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
double y = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
double y = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
|
if (TEST(psp->PlayerP->Flags, PF_WEAPON_RETRACT))
|
||||||
return;
|
return;
|
||||||
|
@ -6242,8 +6242,8 @@ pFistSlide(PANEL_SPRITEp psp)
|
||||||
double ny;
|
double ny;
|
||||||
short vel_adj;
|
short vel_adj;
|
||||||
|
|
||||||
//nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
//nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnFistBlur(psp);
|
SpawnFistBlur(psp);
|
||||||
vel_adj = 68;
|
vel_adj = 68;
|
||||||
|
@ -6268,8 +6268,8 @@ pFistSlideDown(PANEL_SPRITEp psp)
|
||||||
double nx, ny;
|
double nx, ny;
|
||||||
short vel, vel_adj;
|
short vel, vel_adj;
|
||||||
|
|
||||||
nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnFistBlur(psp);
|
SpawnFistBlur(psp);
|
||||||
vel_adj = 48;
|
vel_adj = 48;
|
||||||
|
@ -6361,8 +6361,8 @@ pFistSlideR(PANEL_SPRITEp psp)
|
||||||
double ny;
|
double ny;
|
||||||
short vel_adj;
|
short vel_adj;
|
||||||
|
|
||||||
//nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
//nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnFistBlur(psp);
|
SpawnFistBlur(psp);
|
||||||
vel_adj = 68;
|
vel_adj = 68;
|
||||||
|
@ -6387,8 +6387,8 @@ pFistSlideDownR(PANEL_SPRITEp psp)
|
||||||
double nx, ny;
|
double nx, ny;
|
||||||
short vel, vel_adj;
|
short vel, vel_adj;
|
||||||
|
|
||||||
nx = xs_CRoundToInt(FloatToFixed(psp->x)) | psp->xfract;
|
nx = xs_CRoundToInt(psp->x * FRACUNIT) | psp->xfract;
|
||||||
ny = xs_CRoundToInt(FloatToFixed(psp->y)) | psp->yfract;
|
ny = xs_CRoundToInt(psp->y * FRACUNIT) | psp->yfract;
|
||||||
|
|
||||||
SpawnFistBlur(psp);
|
SpawnFistBlur(psp);
|
||||||
vel_adj = 48;
|
vel_adj = 48;
|
||||||
|
|
Loading…
Reference in a new issue