Skip to content

Commit

Permalink
Add missing id attribute to RCA AI candidate action to_config()
Browse files Browse the repository at this point in the history
With this missing, certain combinations of actions/events would lead to
the ids of all CAs being dropped (e.g. in saves after using
[modify_ai]), which resulted in it not being possible to remove CAs any
more as that is done by id.
This fixes bug #21750.
  • Loading branch information
mattsc committed Mar 3, 2014
1 parent de53e65 commit 6170135
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog
@@ -1,4 +1,9 @@
Version 1.11.11+dev: Version 1.11.11+dev:
* AI:
* Fixed a bug that made it impossible to change or delete Micro AIs after a
game had been reloaded (bug #21750). This was a general bug in the RCA AI
mechanism and applied to other CAs as well, but it was most visible in the
Micro AIs.
* Language and i18n: * Language and i18n:
* Updated translations: German * Updated translations: German


Expand Down
1 change: 1 addition & 0 deletions src/ai/composite/rca.cpp
Expand Up @@ -90,6 +90,7 @@ config candidate_action::to_config() const
config cfg; config cfg;
cfg["enabled"] = enabled_; cfg["enabled"] = enabled_;
cfg["engine"] = engine_; cfg["engine"] = engine_;
cfg["id"] = id_;
cfg["name"] = name_; cfg["name"] = name_;
cfg["score"] = score_; cfg["score"] = score_;
cfg["max_score"] = max_score_; cfg["max_score"] = max_score_;
Expand Down

0 comments on commit 6170135

Please sign in to comment.