OpenTTD

Tasklist

FS#4656 - NewGRF can't disable playing a sound effect in CB 33.

Attached to Project: OpenTTD
Opened by Hirundo (Hirundo) - Thursday, 23 June 2011, 19:42 GMT
Last edited by frosch (frosch) - Saturday, 02 July 2011, 11:24 GMT
Type Bug
Category NewGRF
Status Closed
Assigned To No-one
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

r22607

The specification of CB 33 states the following:
"If the callback returns a sound number that is neither a TTD sound, nor a sound from action 11, nothing will be played."

OpenTTD seems to act differently. In PlayVehicleSound (newgrf_sound.cpp:54), false is returned if the sound ID specified by the grf is bogus. This instructs the caller to play the default sound. Instead the function should return true in this case, in order to not play the default sound.

Attached patch fixes this.
This task depends upon

Closed by  frosch (frosch)
Saturday, 02 July 2011, 11:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r22614

Loading...