Merge pull request #6945 from Phrohdoh/madtank-fix
MadTank deployed teleportation fix.
This commit is contained in:
@@ -16,6 +16,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public interface IPreventsTeleport { bool PreventsTeleport(Actor self); }
|
||||
|
||||
public class Teleport : Activity
|
||||
{
|
||||
Actor chronosphere;
|
||||
@@ -46,6 +48,10 @@ namespace OpenRA.Mods.RA.Activities
|
||||
if (pc != null && !pc.CanTeleport)
|
||||
return NextActivity;
|
||||
|
||||
foreach (var condition in self.TraitsImplementing<IPreventsTeleport>())
|
||||
if (condition.PreventsTeleport(self))
|
||||
return NextActivity;
|
||||
|
||||
var bestCell = ChooseBestDestinationCell(self, destination);
|
||||
if (bestCell == null)
|
||||
return NextActivity;
|
||||
|
||||
Reference in New Issue
Block a user