In DefaultAI::update_mineable_field: is the code "++field.mines_nearby;" really reachable?

Asked by Sigra on 2010-05-23

See DefaultAI::update_mineable_field at []. It seems to check if a node has a building ( and then if the player can build a mine there ( But can it ever be allowed to build a mine on an existing building? If not, the code that is inside both of those if-statements is unreachable.

Question information

English Edit question
widelands Edit question
No assignee Edit question
Last query:
Last reply:
Nasenbaer (nasenbaer) said : #1

in fact, this should be a check of get_ismine() instead. You are of course right here - I will fix this.

Nasenbaer (nasenbaer) said : #2

Committed a fix in rev. 5356

Can you help with this problem?

Provide an answer of your own, or ask Sigra for more information if necessary.

To post a message you must log in.