Source Code Project Mantis - FSSCP
View Issue Details
0003109FSSCPHUDpublic2014-09-26 22:292014-09-28 10:36
ReporterYarn 
Assigned ToYarn 
PriorityhighSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx64OSWindows 7OS Version
Product Version3.7.1 
Target Version3.7.2Fixed in Version 
Summary0003109: Retail head ANIs no longer appearing
DescriptionThe feature added in revision 11079 is causing the retail head ANIs to no longer appear. I think it's caused by an incorrect default, but I haven't played with the code yet because I wanted to report this quickly.
Steps To ReproducePlay any non-training mission from the main campaign and wait for a message. Notice that the head ANI does not appear.
TagsNo tags attached.
related to 0002888resolved Goober5000 Patch to allow for head .ani files without letters 
Attached Filespatch mantis3109.patch (606) 2014-09-26 22:43
http://scp.indiegames.us/mantis/file_download.php?file_id=2572&type=bug

Notes
(0016305)
Yarn   
2014-09-26 22:50   
The cause is exactly what I suspected: the builtin parameter of message_parse() is defaulting to false, which means that head ANIs don't appear unless they're specifically enabled in messages.tbl (the opposite of what's supposed to happen). The attached patch makes the builtin parameter default to true.

The reason that this report is not in code review yet is that I noticed that add_message() sets msg.append_suffix to false, and I'm not certain whether it's OK like that (I think it is).
(0016306)
chief1983   
2014-09-27 10:35   
Yeah I tried to cover my bases on whether it was going to append or not without messing with retail but I didn't have high hopes I got it right the first time. Part of the problem was that I didn't really have good test cases to use for either behavior.
(0016307)
chief1983   
2014-09-27 10:40   
In missionmessage.cpp, when it calls message_parse at line 594, that is in the parsing of messages.tbl, that's where it does set builtin to true. The one thing I wasn't sure of was if people are setting custom messages to use 'head-' or whatever and those also needed to use the head-a, head-b, etc selection. If that's the case, then that is probably why this broke. It should at least be working for actual built-in messages.
(0016308)
Yarn   
2014-09-27 13:32   
Yes, head ANIs are appearing with messages from messages.tbl. The problem only occurs with messages from mission files. If you open the retail missions in a text editor and look at the messages section, you'll see that none of the ANI file names there have letter suffixes. The ANIs that FRED lists also lack the suffixes (which is, at least for retail data, correct behavior).
(0016309)
chief1983   
2014-09-28 10:29   
Fix committed to trunk@11090.
(0016311)
chief1983   
2014-09-28 10:36   
Fixed by reverting 11079 until I can come up with a proper fix. Continue discussing about solution, if interested, in the original ticket 0002888.

Issue History
2014-09-26 22:29YarnNew Issue
2014-09-26 22:29YarnRelationship addedrelated to 0002888
2014-09-26 22:43YarnFile Added: mantis3109.patch
2014-09-26 22:43YarnAssigned To => Yarn
2014-09-26 22:43YarnStatusnew => assigned
2014-09-26 22:50YarnNote Added: 0016305
2014-09-27 10:35chief1983Note Added: 0016306
2014-09-27 10:40chief1983Note Added: 0016307
2014-09-27 13:32YarnNote Added: 0016308
2014-09-28 10:29chief1983Changeset attached => fs2open trunk r11090
2014-09-28 10:29chief1983Note Added: 0016309
2014-09-28 10:29chief1983Statusassigned => resolved
2014-09-28 10:29chief1983Resolutionopen => fixed
2014-09-28 10:36chief1983Note Added: 0016311