IActivity no longer passed Mobiles around.
This commit is contained in:
@@ -49,9 +49,10 @@ namespace OpenRa.Game.Traits.Activities
|
||||
return (u == null || u == self);
|
||||
}
|
||||
|
||||
public IActivity Tick( Actor self, Mobile mobile )
|
||||
public IActivity Tick( Actor self )
|
||||
{
|
||||
var unit = self.traits.Get<Unit>();
|
||||
var mobile = self.traits.Get<Mobile>();
|
||||
|
||||
if( move != null )
|
||||
{
|
||||
@@ -151,6 +152,12 @@ namespace OpenRa.Game.Traits.Activities
|
||||
return 0.5f * ( CenterOfCell( from ) + CenterOfCell( to ) );
|
||||
}
|
||||
|
||||
public void Cancel( Actor self )
|
||||
{
|
||||
path = new List<int2>();
|
||||
NextActivity = null;
|
||||
}
|
||||
|
||||
abstract class MovePart
|
||||
{
|
||||
public readonly float2 from, to;
|
||||
@@ -254,11 +261,5 @@ namespace OpenRa.Game.Traits.Activities
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Cancel( Actor self, Mobile mobile )
|
||||
{
|
||||
path = new List<int2>();
|
||||
NextActivity = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user