View Issue Details

IDProjectCategoryView StatusLast Update
0003063FSSCPsoundpublic2014-06-18 16:19
ReporterAxem Assigned Tom_m  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0003063: Animation code-related sound entries doesn't use new sound format
DescriptionThere's some sound related table entries for the animation code, but they still expect integer indexes, no strings identifiers that were added in with the modular sound table.
TagsNo tags attached.

Activities

m_m

2014-06-16 18:05

developer  

mantis3063.patch (853 bytes)   
Index: code/ship/ship.cpp
===================================================================
--- code/ship/ship.cpp	(revision 10795)
+++ code/ship/ship.cpp	(working copy)
@@ -3811,12 +3811,12 @@
 							current_trigger->end = 0;
 
 						if(optional_string("$Sound:")){
-							required_string("+Start:");
-							stuff_int(&current_trigger->start_sound );
-							required_string("+Loop:");
-							stuff_int(&current_trigger->loop_sound );
-							required_string("+End:");
-							stuff_int(&current_trigger->end_sound );
+							parse_sound("+Start:", &current_trigger->start_sound, sip->name);
+
+							parse_sound("+Loop:", &current_trigger->loop_sound, sip->name);
+
+							parse_sound("+End:", &current_trigger->end_sound, sip->name);
+
 							required_string("+Radius:");
 							stuff_float(&current_trigger->snd_rad );
 						}else{
mantis3063.patch (853 bytes)   

m_m

2014-06-16 18:06

developer   ~0015886

Attached patch fixes the issue.

niffiwan

2014-06-17 03:21

developer   ~0015888

I noticed that parse_sound uses optional_string which is different to the current behaviour (required_string). In this case, I don't think it'll make much difference since the queued_animation seems to have sane defaults set in the constructor - would you agree?

Apart from that it looks good.

m_m

2014-06-17 09:47

developer   ~0015890

Yes, the indices are all set to -1 so if one sound isn't specified it will just not be played so it should be fine.

m_m

2014-06-18 16:19

developer   ~0015893

Fix committed to trunk@10826.

Related Changesets

fs2open: trunk r10826

2014-06-18 12:38

m_m


Ported: N/A

Details Diff
Fix for Mantis 3063: Animation code-related sound entries doesn't use new sound format Affected Issues
0003063
mod - /trunk/fs2_open/code/ship/ship.cpp Diff File

Issue History

Date Modified Username Field Change
2014-06-16 14:13 Axem New Issue
2014-06-16 17:59 m_m Assigned To => m_m
2014-06-16 17:59 m_m Status new => assigned
2014-06-16 18:05 m_m File Added: mantis3063.patch
2014-06-16 18:06 m_m Note Added: 0015886
2014-06-16 18:06 m_m Status assigned => code review
2014-06-17 03:21 niffiwan Note Added: 0015888
2014-06-17 09:47 m_m Note Added: 0015890
2014-06-18 16:19 m_m Changeset attached => fs2open trunk r10826
2014-06-18 16:19 m_m Note Added: 0015893
2014-06-18 16:19 m_m Status code review => resolved
2014-06-18 16:19 m_m Resolution open => fixed