mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-12 23:54:37 +00:00
- SW: fixed interpolation for sector object sprites.
When checking for an existing interpolation it needs to check the actual sprite, not just the interpolation type.
This commit is contained in:
parent
424c0ce3f4
commit
4a6a999f89
1 changed files with 12 additions and 3 deletions
|
@ -108,8 +108,10 @@ static void so_setpointinterpolation(so_interp *interp, int element)
|
|||
return;
|
||||
|
||||
for (i = 0; i < interp->numinterpolations; i++)
|
||||
{
|
||||
if (interp->data[i].curelement == element)
|
||||
return;
|
||||
}
|
||||
|
||||
so_interp::interp_data *data = &interp->data[interp->numinterpolations++];
|
||||
|
||||
|
@ -127,7 +129,7 @@ static void so_setspriteanginterpolation(so_interp *interp, int32_t spritenum)
|
|||
return;
|
||||
|
||||
for (i = 0; i < interp->numinterpolations; i++)
|
||||
if (interp->data[i].curelement == -1)
|
||||
if (interp->data[i].curelement == -1 && interp->data[i].spriteofang == spritenum)
|
||||
return;
|
||||
|
||||
so_interp::interp_data *data = &interp->data[interp->numinterpolations++];
|
||||
|
@ -146,9 +148,16 @@ static void so_stopdatainterpolation(so_interp *interp, int element)
|
|||
int32_t i;
|
||||
|
||||
for (i = 0; i < interp->numinterpolations; i++)
|
||||
if (interp->data[i].curelement == element)
|
||||
{
|
||||
if (interp->data[i].curelement == -1)
|
||||
{
|
||||
if (interp->data[i].spriteofang == element) break;
|
||||
}
|
||||
else if (interp->data[i].curelement == element)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (i == interp->numinterpolations)
|
||||
return;
|
||||
|
||||
|
@ -217,7 +226,7 @@ void so_setspriteinterpolation(SECTOR_OBJECTp sop, spritetype *sp)
|
|||
so_setpointinterpolation(interp, snum | soi_spry);
|
||||
if (!interp->hasvator)
|
||||
so_setpointinterpolation(interp, snum | soi_sprz);
|
||||
so_setspriteanginterpolation(interp, int(sp - sprite));
|
||||
so_setspriteanginterpolation(interp, snum);
|
||||
}
|
||||
|
||||
void so_stopspriteinterpolation(SECTOR_OBJECTp sop, spritetype *sp)
|
||||
|
|
Loading…
Reference in a new issue