Exemple #1
0
        private void ResetFleeStatus()
        {
            var methodName = "ResetFleeStatus";

            LogTrace(methodName);

            LogMessage(methodName, LogSeverityTypes.Debug, "Resetting flee status: {0}",
                       FleeReason);

            //This pulses before movement so we need to remove the flee desti from the desti queue
            if (_movement.DestinationQueue.Count > 0 &&
                _movement.DestinationQueue[0] == FleeDestination)
            {
                LogMessage(methodName, LogSeverityTypes.Debug, "No longer need to flee to FleeDestination, clearing the movement queue.");
                _movement.ClearDestinations(true);
            }

            FleeReason      = FleeReasons.None;
            FleeDestination = null;
        }