mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- interpolation fix from EDuke: "Patch from Striker to improve sprite interpolation"
Fixes #109
This commit is contained in:
parent
807dd17165
commit
1f7bc6d69e
6 changed files with 37 additions and 5 deletions
|
@ -5080,6 +5080,12 @@ void fall_common(int g_i, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOT
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int LocateTheLocator(int n, int sn)
|
||||
{
|
||||
int i;
|
||||
|
@ -5094,6 +5100,31 @@ int LocateTheLocator(int n, int sn)
|
|||
return -1;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void recordoldspritepos()
|
||||
{
|
||||
|
||||
for (int statNum = 0; statNum < MAXSTATUS; statNum++)
|
||||
{
|
||||
int spriteNum = headspritestat[statNum];
|
||||
|
||||
while (spriteNum >= 0)
|
||||
{
|
||||
int const nextSprite = nextspritestat[spriteNum];
|
||||
hittype[spriteNum].bposx = sprite[spriteNum].x;
|
||||
hittype[spriteNum].bposy = sprite[spriteNum].y;
|
||||
hittype[spriteNum].bposz = sprite[spriteNum].z;
|
||||
|
||||
spriteNum = nextSprite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -4388,6 +4388,7 @@ void think_d(void)
|
|||
{
|
||||
thinktime.Reset();
|
||||
thinktime.Clock();
|
||||
recordoldspritepos();
|
||||
|
||||
movefta_d(); //ST 2
|
||||
moveweapons_d(); //ST 4
|
||||
|
|
|
@ -4681,6 +4681,7 @@ void think_r(void)
|
|||
{
|
||||
thinktime.Reset();
|
||||
thinktime.Clock();
|
||||
recordoldspritepos();
|
||||
|
||||
movefta_r(); //ST 2
|
||||
moveweapons_r(); //ST 4
|
||||
|
|
|
@ -60,7 +60,7 @@ void animatesprites_d(int x,int y,int a,int smoothratio)
|
|||
{
|
||||
case DEVELOPERCOMMENTARY:
|
||||
case DEVELOPERCOMMENTARY + 1:
|
||||
if(!isWorldTour() || !dukewt_commentary)
|
||||
if(isWorldTour() && !dukewt_commentary)
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
break;
|
||||
case BLOODPOOL:
|
||||
|
@ -175,8 +175,7 @@ void animatesprites_d(int x,int y,int a,int smoothratio)
|
|||
t->z = ps[s->yvel].oposz + mulscale16(smoothratio,ps[s->yvel].posz-ps[s->yvel].oposz);
|
||||
t->z += (40<<8);
|
||||
}
|
||||
else if( ( s->statnum == STAT_DEFAULT && s->picnum != CRANEPOLE) || s->statnum == STAT_PLAYER ||
|
||||
s->statnum == STAT_STANDABLE || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC || s->statnum == STAT_ACTOR )
|
||||
else if(s->picnum != CRANEPOLE)
|
||||
{
|
||||
t->x -= mulscale16(MaxSmoothRatio-smoothratio,s->x-hittype[i].bposx);
|
||||
t->y -= mulscale16(MaxSmoothRatio-smoothratio,s->y-hittype[i].bposy);
|
||||
|
|
|
@ -162,8 +162,7 @@ void animatesprites_r(int x,int y,int a,int smoothratio)
|
|||
s->xrepeat = 24;
|
||||
s->yrepeat = 17;
|
||||
}
|
||||
else if ((s->statnum == STAT_DEFAULT && s->picnum != CRANEPOLE) || s->statnum == STAT_PLAYER ||
|
||||
s->statnum == STAT_STANDABLE || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC || s->statnum == STAT_ACTOR)
|
||||
else if (s->picnum != CRANEPOLE)
|
||||
{
|
||||
t->x -= mulscale16(MaxSmoothRatio-smoothratio,s->x-hittype[i].bposx);
|
||||
t->y -= mulscale16(MaxSmoothRatio-smoothratio,s->y-hittype[i].bposy);
|
||||
|
|
|
@ -232,6 +232,7 @@ void calcviewpitch(player_struct* p, double factor);
|
|||
void sethorizon(int snum, ESyncBits actions, double factor, fixed_t adjustment);
|
||||
bool movementBlocked(int snum);
|
||||
void loadcons();
|
||||
void recordoldspritepos();
|
||||
|
||||
void updateinterpolations();
|
||||
void restoreinterpolations();
|
||||
|
|
Loading…
Reference in a new issue