Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI function fixes and improvements #440

Merged
merged 3 commits into from
Jul 17, 2016
Merged

AI function fixes and improvements #440

merged 3 commits into from
Jul 17, 2016

Commits on Jul 16, 2016

  1. Fix building search loop in taskSearchArea

    If a building search was enacted, the waypoint would be locked by the searchNearby function before it is actually considered completed. This would result in AI repeatedly going back to the same waypoint and triggering the onCompletion statement causing another building search.
    kymckay committed Jul 16, 2016
    Configuration menu
    Copy the full SHA
    194c089 View commit details
    Browse the repository at this point in the history
  2. Fix resetting of building positions in taskDefend

    The array of building positions stored by the function would be set to `nil` then subsequently set to an empty array in the event of all positions being used up. This would result in the building never being used again by future calls to the function.
    kymckay committed Jul 16, 2016
    Configuration menu
    Copy the full SHA
    4e038bb View commit details
    Browse the repository at this point in the history
  3. Improve behaviour of AI function taskDefend

    - Minor optimization
    - Using the new `disableAI "PATH"` simplifies the code and allows it to be easily reverted unlike `doStop`
    - If patrol is enabled then units should patrol regardless of how many are assigned, otherwise they end up standing around
    - Units in position are told to stay upright for better use of windows and more engaging combat
    - No longer need to `enableAttack false` since no longer using `doStop` - which allows unassigned units to counterattack in case of contact
    kymckay committed Jul 16, 2016
    Configuration menu
    Copy the full SHA
    6d7906b View commit details
    Browse the repository at this point in the history