Skip to content

Commit

Permalink
Forest Animals MAI: fix AI crash when using custom rabbit hole image
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsc committed Dec 27, 2018
1 parent 92ef6bc commit 8b3c6b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -108,6 +108,7 @@
* New parameter mp_rank for setting the order in which AIs appear in the MP computer player selection menu
* New option "Keep saved AI" when reloading games from the MP Create Game screen. Choosing this option
prevents overwriting of the saved AI by the default AI. (issue #3791)
* Forest Animals Micro AI: fix AI crash when using custom rabbit hole image
### Campaigns
* Descent Into Darkness:
* Allow converting L3 necromancers to liches from S12 onwards (issue #3165).
Expand Down
2 changes: 1 addition & 1 deletion data/ai/micro_ais/cas/ca_forest_animals_move.lua
Expand Up @@ -47,7 +47,7 @@ function ca_forest_animals_move:execution(cfg)
wesnoth.wml_actions.clear_variable { name = 'holes_wml' }

-- If cfg.rabbit_hole_img is set, only items with that image or halo count as holes
local holes
local holes = {}
if cfg.rabbit_hole_img then
for _,item in ipairs(all_items) do
if (item.image == cfg.rabbit_hole_img) or (item.halo == cfg.rabbit_hole_img) then
Expand Down

0 comments on commit 8b3c6b1

Please sign in to comment.