View Issue Details

IDProjectCategoryView StatusLast Update
0003109FSSCPHUDpublic2014-09-28 14:36
ReporterYarn Assigned ToYarn  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindows 7 
Product Version3.7.1 
Target Version3.7.2 
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.

Relationships

related to 0002888 resolvedGoober5000 Patch to allow for head .ani files without letters 

Activities

Yarn

2014-09-27 02:43

developer  

mantis3109.patch (606 bytes)   
Index: code/mission/missionmessage.h
===================================================================
--- code/mission/missionmessage.h	(revision 11089)
+++ code/mission/missionmessage.h	(working copy)
@@ -190,7 +190,7 @@
 
 // function to parse a message from either messages.tbl or the mission file.  Both files have the
 // exact same format, so this function just gets reused in both instances.
-void	message_parse(bool importing_from_fsm = false, bool builtin = false);
+void	message_parse(bool importing_from_fsm = false, bool builtin = true);
 void	persona_parse();
 
 void	messages_init();
mantis3109.patch (606 bytes)   

Yarn

2014-09-27 02:50

developer   ~0016305

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).

chief1983

2014-09-27 14:35

administrator   ~0016306

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.

chief1983

2014-09-27 14:40

administrator   ~0016307

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.

Yarn

2014-09-27 17:32

developer   ~0016308

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).

chief1983

2014-09-28 14:29

administrator   ~0016309

Fix committed to trunk@11090.

chief1983

2014-09-28 14:36

administrator   ~0016311

Fixed by reverting 11079 until I can come up with a proper fix. Continue discussing about solution, if interested, in the original ticket 0002888.

Related Changesets

fs2open: trunk r11090

2014-09-28 11:06

chief1983


Ported: N/A

Details Diff
Fix Mantis 3109: Revert r11079 and reopen 0002888 since I didn't realize that Fred messages also often use built-in suffix appending. Need to either use FUBAR's original solution or re-engineer something else. Affected Issues
0002888, 0003109
mod - /trunk/fs2_open/code/mission/missionmessage.cpp Diff File
mod - /trunk/fs2_open/code/mission/missionmessage.h Diff File

Issue History

Date Modified Username Field Change
2014-09-27 02:29 Yarn New Issue
2014-09-27 02:29 Yarn Relationship added related to 0002888
2014-09-27 02:43 Yarn File Added: mantis3109.patch
2014-09-27 02:43 Yarn Assigned To => Yarn
2014-09-27 02:43 Yarn Status new => assigned
2014-09-27 02:50 Yarn Note Added: 0016305
2014-09-27 14:35 chief1983 Note Added: 0016306
2014-09-27 14:40 chief1983 Note Added: 0016307
2014-09-27 17:32 Yarn Note Added: 0016308
2014-09-28 14:29 chief1983 Changeset attached => fs2open trunk r11090
2014-09-28 14:29 chief1983 Note Added: 0016309
2014-09-28 14:29 chief1983 Status assigned => resolved
2014-09-28 14:29 chief1983 Resolution open => fixed
2014-09-28 14:36 chief1983 Note Added: 0016311