Drags death sounds out of RenderInfantry into a separate DeathSounds trait.
Play death sounds with a new PlayVoiceLocal so they don't use full volume regardless of position relative to camera. Adds option for alternative burn and zap death sounds. Renames RenderInfantry's UseInfantryDeath trait to SpawnsCorpse. Removes hack from ra desert shellmap.
This commit is contained in:
@@ -367,6 +367,19 @@ namespace OpenRA
|
||||
var type = mi.Voice.ToLowerInvariant();
|
||||
return PlayPredefined(null, voicedUnit, type, phrase, variant, true);
|
||||
}
|
||||
|
||||
public static bool PlayVoiceLocal(string phrase, Actor voicedUnit, string variant, WPos pos)
|
||||
{
|
||||
if (voicedUnit == null || phrase == null)
|
||||
return false;
|
||||
|
||||
var mi = voicedUnit.Info.Traits.GetOrDefault<SelectableInfo>();
|
||||
if (mi == null || mi.Voice == null)
|
||||
return false;
|
||||
|
||||
var type = mi.Voice.ToLowerInvariant();
|
||||
return PlayPredefined(null, voicedUnit, type, phrase, variant, true);
|
||||
}
|
||||
|
||||
public static bool PlayNotification(Player player, string type, string notification, string variant)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user