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(¤t_trigger->start_sound );
- required_string("+Loop:");
- stuff_int(¤t_trigger->loop_sound );
- required_string("+End:");
- stuff_int(¤t_trigger->end_sound );
+ parse_sound("+Start:", ¤t_trigger->start_sound, sip->name);
+
+ parse_sound("+Loop:", ¤t_trigger->loop_sound, sip->name);
+
+ parse_sound("+End:", ¤t_trigger->end_sound, sip->name);
+
required_string("+Radius:");
stuff_float(¤t_trigger->snd_rad );
}else{
|
|
|
Attached patch fixes the issue. |
|
|
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. |
|
|
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. |
|
|
Fix committed to trunk@10826. |
|