diff --git a/source/sw/src/game.h b/source/sw/src/game.h index 3a861cf4f..ad9bb6aae 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -1594,6 +1594,8 @@ typedef struct short Vis; // Shading upgrade, for shooting, etc... SWBOOL DidAlert; // Has actor done his alert noise before? + int16_t oangdiff; // Used for interpolating sprite angles + uint8_t filler; } USER,*USERp; diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index 623adcfde..3e0b651f8 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -1892,6 +1892,7 @@ PlayerPart: } } + int16_t oldang = sp->ang; sp->ang = u->sang; if (TEST(u->Flags, SPR_ON_SO_SECTOR)) @@ -1931,6 +1932,8 @@ PlayerPart: setspritez(sop->sp_num[i], (vec3_t *)sp); } + u->oangdiff += GetDeltaAngle(sp->ang, oldang); + if (TEST(sp->extra, SPRX_BLADE)) { DoBladeDamage(sop->sp_num[i]);