Latest Posts

Topic: Coding, soldier retreating

the-x
Avatar
Topic Opener
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2020-10-17, 11:25

Does anybody have a clue where in code can I see when a soldier retreats, the distance maximal range and where is calculated when nearby allies support in defense?


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2020-10-17, 11:43

the-x wrote:

Does anybody have a clue where in code can I see when a soldier retreats,

https://github.com/widelands/widelands/blob/27027697bdd1cb2a935fa2bdd4002370cf7af249/src/logic/map_objects/tribes/soldier.cc#L830

the distance maximal range and where is calculated when nearby allies support in defense?

As can be seen in the code this is not taken into account. for the retreat decision.


Top Quote