Opened 9 years ago

Last modified 4 years ago

#3472 closed defect

Ship not reacting correctly to garrison command. — at Version 5

Reported by: Stan Owned by:
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.

Change History (6)

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
Note: See TracTickets for help on using tickets.