Merge pull request #12315 from obrakmann/activities-pt1

Activities re-write, part 1 (aka the boring bits)
This commit is contained in:
reaperrr
2016-11-18 13:52:06 +01:00
committed by GitHub
26 changed files with 96 additions and 100 deletions

View File

@@ -237,7 +237,7 @@ namespace OpenRA.Mods.Common.Traits
void INotifyBlockingMove.OnNotifyBlockingMove(Actor self, Actor blocking)
{
// I'm blocking someone else from moving to my location:
var act = self.GetCurrentActivity();
var act = self.CurrentActivity;
// If I'm just waiting around then get out of the way:
if (act is Wait)

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Traits.Render
yield return new TextRenderable(font, self.CenterPosition - offset, 0, color, tagString);
// Get the actor's activity.
var activity = self.GetCurrentActivity();
var activity = self.CurrentActivity;
if (activity != null)
{
var activityName = activity.GetType().ToString().Split('.').Last();

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Traits.Render
if (!self.IsInWorld || self.IsDead)
yield break;
var activity = self.GetCurrentActivity();
var activity = self.CurrentActivity;
if (activity != null)
{
var targets = activity.GetTargets(self);