Provide an early exit in RunActivity when there is no activity.

This commit is contained in:
RoosterDragon
2015-09-10 19:45:07 +01:00
parent 64dbaf8e76
commit faaf1ea1e1

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();