wounded attacking soldiers failing to retreat
Bug #1554552 reported by
king of nowhere
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
High
|
Unassigned |
Bug Description
When an attacking soldier drops below 50% healt, it will retreat if possible, i.e. if it is not surrounded by enemies. This mechanism is malfunctioning in 7852, where soldiers keep attacking even if they are low in healt AND there are no enemies around. See attached replay
Related branches
lp:~widelands-dev/widelands/bug-1554552
- GunChleoc: Approve
-
Diff: 230 lines (+54/-22)3 files modifiedsrc/logic/map_objects/bob.h (+1/-1)
src/logic/map_objects/tribes/soldier.cc (+50/-21)
src/logic/map_objects/tribes/soldier.h (+3/-0)
Changed in widelands: | |
importance: | Undecided → High |
milestone: | none → build19-rc1 |
tags: | added: military |
Changed in widelands: | |
status: | New → Fix Committed |
assignee: | TiborB (tiborb95) → nobody |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It seems that this union is causing a problem:
union {int32_t ivar3; uint32_t ui32var3;}
In my branch I eliminated it and created new variable of soldier object: retreat_health. One of advantages will be that the value will be visible via DBG window and also in verbose logs. So a tester will see what value is applied.
I am not able to load attached files, though...