Don't give an okay voice when not allowed to move into shroud.

This commit is contained in:
Matthias Mailänder
2017-08-29 15:22:40 +02:00
committed by abcdefg30
parent d4340fa799
commit b27289106d
3 changed files with 9 additions and 0 deletions

View File

@@ -668,6 +668,9 @@ namespace OpenRA.Mods.Common.Traits
public string VoicePhraseForOrder(Actor self, Order order)
{
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
return null;
switch (order.OrderString)
{
case "Move":

View File

@@ -83,6 +83,9 @@ namespace OpenRA.Mods.Common.Traits
string IOrderVoice.VoicePhraseForOrder(Actor self, Order order)
{
if (!info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
return null;
if (order.OrderString == "AttackMove" || order.OrderString == "AssaultMove")
return info.Voice;

View File

@@ -649,6 +649,9 @@ namespace OpenRA.Mods.Common.Traits
public string VoicePhraseForOrder(Actor self, Order order)
{
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
return null;
switch (order.OrderString)
{
case "Move":