Skip to content

Commit c7fbefe

Browse files
committed
Remove potentially-harmful condition in message_mission_free_avi()
If we tell it to free up the animation, I think it should happen regardless of whether or not the HUD_TALKING_HEAD gauge is currently active or not. Also, unloading an animation shouldn't crash even if one wasn't loaded in the first place... and if it does, we should probably fix that instead of slapping a band-aid on the calling function.
1 parent 78a1e5b commit c7fbefe

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

code/mission/missionmessage.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,6 @@ void message_mission_free_avi(int m_index)
748748
if ( (m_index < 0) || (m_index >= Num_message_avis) )
749749
return;
750750

751-
// Make sure this code doesn't get run if the talking head guage is off
752-
// helps prevent a crash on jump out if this code doesn't work right
753-
if ( !hud_gauge_active(HUD_TALKING_HEAD) )
754-
return;
755-
756751
generic_anim_unload(&Message_avis[m_index].anim_data);
757752
}
758753

0 commit comments

Comments
 (0)