Forest Animals MAI: fix AI crash when using custom rabbit hole image

This commit is contained in:
mattsc 2018-12-27 14:51:18 -08:00
parent 44e1037de2
commit 2c94696f83
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,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).

View file

@ -48,7 +48,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