Skip to content

Commit 23aa8cb

Browse files
committed
Merge pull request #504 from niffiwan/fix/shield_hit_anim_duration
Allow shield hit animations to play to the end
2 parents a9b4be5 + ee64b83 commit 23aa8cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/ship/shield.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ void render_shield(int shield_num)
447447
// don't try to draw if we don't have an ani
448448
if ( sa->first_frame >= 0 )
449449
{
450-
frame_num = fl2i( f2fl(Missiontime - Shield_hits[shield_num].start_time) * sa->num_frames );
450+
frame_num = fl2i( f2fl(Missiontime - Shield_hits[shield_num].start_time) / f2fl(SHIELD_HIT_DURATION) * sa->num_frames );
451451
if ( frame_num >= sa->num_frames ) {
452452
frame_num = sa->num_frames - 1;
453453
} else if ( frame_num < 0 ) {

0 commit comments

Comments
 (0)