Computer Player does not adhere to currently allowed buildings

Bug #537392 reported by SirVer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

The computer player is not adhering to the Player::is_building_type_allowed. It only checks once for the valid building types in defaultai.cc::2138. This brings problems when scenarios activate or deactive buildings for the computer player.

The bug did not surface earlier because no scenario used this functionality so far and the allowed_buildings map packet is loaded before the computer player constructs it's allowed buildings cache. The allowed_buildings packet is likely going to be removed in build16, so computer player must learn to follow the rules.

This bug is easy to fix, the necessary changes are in mostly in defaultai.cc.

SirVer (sirver)
Changed in widelands:
status: New → Confirmed
importance: Undecided → High
milestone: none → build16-rc1
tags: added: computerplayer
Nasenbaer (nasenbaer)
Changed in widelands:
assignee: nobody → Nasenbaer (nasenbaer)
Nasenbaer (nasenbaer)
Changed in widelands:
status: Confirmed → Fix Committed
Nasenbaer (nasenbaer)
Changed in widelands:
assignee: Nasenbaer (nasenbaer) → nobody
Revision history for this message
SirVer (sirver) wrote :

Released in build16-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.