They can attack me but I can't attack them

Bug #995011 reported by Peter Waller on 2012-05-05
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Nicolai Hähnle

Bug Description

The map is last bastion. The same problem was seen in another game back in build 16.

Red cannot attack blue, but blue can attack red (as the AI will shortly after the map starts). When clicking on a blue military building, 0/0 soliders is shown. This isn't an issue of the shroud.

Related branches

Peter Waller (peter.waller) wrote :
description: updated
wl-zocker (wl-zocker) wrote :

I do not think that this is related to bug 566970 because in that game, the way was blocked. In this game, red only seems to be too far away.

IIRC, if the distance between two buildings is less than 25, the soldiers can attack each other. But I do not know from what point (door or flag) that distance is calculated.

Maybe the distance is calculated from the attacker's door to the enemy's flag, which means that the distance blue (right side) to red (left side) is shorter than red to blue, because the flags are on the right side. I do not know if this is the case, so a programmer should check that.

Changed in widelands:
status: New → Confirmed
description: updated
Nicolai Hähnle (nha) wrote :

The problem is one of asymmetry: The attacking code searches for buildings within a 25-field radius from the attacked building's flag, which makes it easier to attack from large buildings into a north-western direction.

Suggested solution: Search from flag to flag instead.

description: updated
Changed in widelands:
importance: Undecided → Medium
milestone: none → build18-rc1
Nicolai Hähnle (nha) on 2013-02-11
Changed in widelands:
assignee: nobody → Nicolai Hähnle (nha)
SirVer (sirver) wrote :

I agree to the solution with searching from the flags.

Nicolai Hähnle (nha) wrote :

Fix committed to trunk in bzr6511.

Changed in widelands:
status: Confirmed → Won't Fix
status: Won't Fix → Fix Committed
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers