← Back to team overview

widelands-dev team mailing list archive

[Bug 530646] Re: Idle military people

 

It  wont't appear in the same situation. Even the situation will not
appear in the game any more. But the bug is there.

I try to explain it again.

This bug is a difference between soldiers from a militarysite and a
headquarter(and i think from a warehouse too). Bug #531037 only
triggered this one. Bug #531037 was a wrong pop_task inside
task_defense. This causes a different behavior for the "two types of
soldiers": Soldiers from a militarysite return to their building.
Soldiers without a militarysite disappear but exist in the worker list
of their building.

I had a look at the code again and I think it's the following problem:
A soldier launched from a militarysite has a task "buildingwork" and then task "attack" or "defense". Soldiers launched from a headquarter (or warehouse?) only have task "defense". If pop_task is called in the first case task "buildingwork" takes the solider home (or to a warehouse). In the second case the solider is forever at his last position without any task (But he is a worker of his building).

Either calling pop_task without being home or something with the sending
of soldiers from a headquarter is wrong. I am not completely familiar
with the task system but I think pop_task should no be called if the
worker is not at his building.

I can imagine at least on situation where this could happen: If you
attack near a headquarter and the headquarter disappears while some
soldiers defend it they would disappear because of this bug.

-- 
Idle military people
https://bugs.launchpad.net/bugs/530646
You received this bug notification because you are a member of Widelands
Developers, which is subscribed to widelands.

Status in Widelands: Confirmed

Bug description:
Full description here, only tracked here to be markes as show stopper for rc1

https://sourceforge.net/tracker/?func=detail&aid=2961814&group_id=40163&atid=427221





Follow ups