Merge pull request #9445 from RoosterDragon/activity-early-bail

Provide an early exit in RunActivity when there is no activity
This commit is contained in:
atlimit8
2015-09-26 14:02:14 -05:00

View File

@@ -74,6 +74,9 @@ namespace OpenRA.Traits
public static Activity RunActivity(Actor self, Activity act)
{
if (act == null)
return act;
// Note - manual iteration here for performance due to high call volume.
var longTickThresholdInStopwatchTicks = PerfTimer.LongTickThresholdInStopwatchTicks;
var start = Stopwatch.GetTimestamp();