Remove IPreventsTeleport interface.
MadTank is changed to use conditions instead. This has a side-benefit of disabling the move cursor while deployed.
This commit is contained in:
@@ -19,8 +19,6 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Activities
|
||||
{
|
||||
public interface IPreventsTeleport { bool PreventsTeleport(Actor self); }
|
||||
|
||||
public class Teleport : Activity
|
||||
{
|
||||
readonly Actor teleporter;
|
||||
@@ -50,10 +48,6 @@ namespace OpenRA.Mods.Cnc.Activities
|
||||
if (teleporter == self && 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