s25client icon indicating copy to clipboard operation
s25client copied to clipboard

Soldiers walk through other soldiers

Open Spikeone opened this issue 10 years ago • 5 comments

Nach dem Angriff auf den Hafen, liefen die Soldaten zurück, während 2 direkt übereinander gelaufen sind, im originalen sind allerdings soldaten nie durch andere hindurch gelaufen. Zu sehen bei dem Angriff von weiß auf Blau

Spike (fvv1) wrote on 2010-09-11: #1 2010-09-11_15-23-35.rpl Edit (15.0 KiB, application/octet-stream)

https://bugs.launchpad.net/s25rttr/+bug/635753

YES, this bug IS still valid.

Spikeone avatar Jul 30 '15 21:07 Spikeone

I don't think we have collision detection somewhere. Every figure just ignores other figures and situations like this are usually avoided by randomizing the walk direction.

Note that fixing this may significantly increase the time it takes for soldiers returning because the path back might be the same for all soldiers so they will queue up on a single point...

Flamefire avatar Dec 04 '18 15:12 Flamefire

Well - it'd be quite simple (at least in my mind): If a soldiers moves to a node, that node is occupied. A node that is occupied can't be used by an other soldier for it's pathfinding. When a node is reached, path gets recalculated. That way it should work like it did in the original and would only take some more time.

EDIT: Shall I make a video so we could possibly analyze how it worked in the original?

Spikeone avatar Dec 04 '18 20:12 Spikeone

image

Spikeone avatar Dec 25 '18 15:12 Spikeone

Possible problem: Returning soldiers could block attacking soldiers leading to a deadlock. Solution: returning soldiers do not block

Flamefire avatar Dec 27 '18 13:12 Flamefire

While playing around a bit - soldiers actually walked inside each other when changing occupation for a border group.

Spikeone avatar Jan 11 '20 13:01 Spikeone