Opened 9 years ago

Closed 4 years ago

#3472 closed defect (fixed)

Ship not reacting correctly to garrison command.

Reported by: Stan Owned by: wraitii
Priority: Must Have Milestone: Alpha 24
Component: Simulation Keywords: patch
Cc: Patch: Phab:D665

Description (last modified by elexis)

See the commands attached to #3471

Basically, when I tried to garrison units into the boat to get them on the other side of the river the boat would move along the coast instead of just stopping and letting the units enter it.

Also I had to manually move it in order to be able to ungarrison units.

Attachments (1)

commands_19105.txt (17.2 KB ) - added by elexis 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by wraitii, 8 years ago

Milestone: BacklogAlpha 20

comment:2 by elexis, 8 years ago

Milestone: Alpha 20Backlog

Backlogging due to lack of progress.

comment:3 by mimo, 8 years ago

In 17764:

update goal before pathing when moving target refs #3472 and improve unitMotion overlay

comment:4 by elexis, 7 years ago

Summary: Boat not reacting correctly to garrison command.Ship not reacting correctly to garrison command.

Some research by bb:

Index: binaries/data/mods/public/simulation/components/UnitAI.js
===================================================================
--- binaries/data/mods/public/simulation/components/UnitAI.js	(revision 19101)
+++ binaries/data/mods/public/simulation/components/UnitAI.js	(working copy)
@@ -2949,6 +2949,10 @@
 				},
 
 				"MoveCompleted": function() {
+					// make sure we are in range, otherwise retry
+					if (this.MoveToGarrisonRange(this.order.data.target))
+						return;
+
 					if (this.IsUnderAlert() && this.alertGarrisoningTarget)
 					{
 						// check that we can garrison in the building we're supposed to garrison in
(01:52:28) bb_: maybe it doesn't solve all issues
(01:52:36) bb_: UnitAI
(01:56:34) bb_: and this replay proofs the difference: http://pastebin.com/xVJ2Kh70
(01:56:43) bb_: on second pickup
(01:57:25) bb_: surely patch is incomplete
(01:57:49) bb_: as ship can probably be docked away from shore
(01:58:04) bb_: and then those new commands r just useless
(01:59:51) bb_: in replay about 1:50 min

by elexis, 7 years ago

Attachment: commands_19105.txt added

comment:5 by elexis, 6 years ago

Description: modified (diff)
Keywords: patch added
Milestone: BacklogWork In Progress
Patch: Phab:D665

comment:6 by Imarok, 5 years ago

Component: UI & SimulationSimulation

Move tickets to Simulation as UI & Simulation got some sub components.

comment:7 by elexis, 4 years ago

Milestone: Work In ProgressAlpha 24
Priority: Should HaveMust Have

The issue causes serious flabbergasting as reported in the patch. (I don't set myself as a reviewer, so if someone wants to release without addressing the issue, they should at least be notified of this issue again when bumping tickets.)

Last edited 4 years ago by elexis (previous) (diff)

comment:8 by wraitii, 4 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 23925:

Improve ship pickup.

Improve unitAI: don't move if the requester can reach us and we are close enough. This avoids an issue where ships moved more than necessary when picking up many units.
Also improve requester UnitAI -> retry pickup if the target entity is Idle.
Improve unitMotion: periodically recompute paths in "known bad path" mode to adapt to moving targets.
Expose UnitMotion reachability to scripts and other code.

This adds a test map for some common and some tricky pickup cases, using triggers.

Based on a patch by: causative

Reviewed By: Freagarach

Fixes #3472

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

Note: See TracTickets for help on using tickets.