HomeWildfire Games

Fix UnitAI behaviour inconsistent with its stance for packed units and set…
Concern RaisedrP21630

Description

Fix UnitAI behaviour inconsistent with its stance for packed units and set default stance to standground for packed units.

Reviewed By: temple

Trac Tickets: #5091

Differential Revision: https://code.wildfiregames.com/D1413

Details

Event Timeline

bb raised a concern with this commit.Apr 16 2018, 4:32 PM
bb added a subscriber: bb.
bb added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
488–492

now we have the bug the other way around: siege tries to chase, and thus pack again while it is forbidden by their stance. As a result a standground siege will repeatedly pack and unpack when a unit comes in and out of range.

This commit now has outstanding concerns.Apr 16 2018, 4:32 PM
temple added a subscriber: temple.Apr 17 2018, 1:22 AM
temple added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
467–482

Instead it's just the wrong order here, we should check standground first and then pack after that.

488–492

It's not chase, is it?

bb added inline comments.Apr 17 2018, 10:25 AM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
467–482

whatever, have to admit that I didn't examen the code thoroughly, probably you are right

elexis added a subscriber: elexis.Apr 17 2018, 1:13 PM
elexis added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
467–482

(Seems like the focus lies more on exams than examining patches)

bb accepted this commit.May 7 2018, 11:50 PM

resolved

All concerns with this commit have now been addressed.May 7 2018, 11:50 PM
elexis raised a concern with this commit.Oct 30 2018, 9:02 PM
elexis added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
456

Removing this check introduced a behavior that is not expected and can't be intended.

If a siege engine has an enemy in vision range, it will start unpacking.
If one orders it to cancel unpacking, it starts unpacks from 0 again.
If one orders it to move, it wants to wait until its unpacked.
So the player cannot move the packed siege engine unless unpacking and packing it again.

I don't know how the code and the feature should be, but it can't be intended that one has to wait unpack and pack to get into a state where one can move the packed unit.

Reported at #5328.

This commit now has outstanding concerns.Oct 30 2018, 9:02 PM

Refs rP23298. But not enough fixed for a resign, I guess?