Adds PlayVoice, PlayVoiceLocal and HasVoice to ActorExts.

Makes Cargo unload voice customisable.
This commit is contained in:
reaperrr
2015-05-21 05:35:08 +02:00
parent 5f68516070
commit 5e2c781c8a
5 changed files with 41 additions and 8 deletions

View File

@@ -39,8 +39,7 @@ namespace OpenRA.Mods.Common.Traits
if (e.DamageState == DamageState.Dead && damaged != e.Attacker)
{
if (self.World.WorldTick - lastAnnounce > info.Interval * 25)
foreach (var voiced in self.TraitsImplementing<IVoiced>())
voiced.PlayVoice(self, "Kill", self.Owner.Country.Race);
self.PlayVoice(self, "Kill", self.Owner.Country.Race);
lastAnnounce = self.World.WorldTick;
}