Source Code Project Mantis - FSSCP
View Issue Details
0001496FSSCPFREDpublic2007-09-08 12:182012-12-09 22:35
ReporterRansom Arceihn 
Assigned ToAdmiral MS 
PlatformOSOS Version
Product Version3.6.9 
Target VersionFixed in Version 
Summary0001496: Ships stopping mid-waypoint
DescriptionSo, there's two fighters in the same wing. One of them's going to a waypoint, the other's guarding the first. Then they both get clear-goals and an order - the first one is told to play-dead (or stay-still) and the second gets a waypoint-once order.

But BOTH ships stop. If you shoot the second fighter, only then will it get moving toward the waypoint.
Additional InformationHappens in every build I've tried in the stable branch up to the 15th of August. I've tried a dozen variations on the situation, but it seems that whenever the first ship stops the second one invariably does the same until it's shot.
TagsNo tags attached.
Attached Files? waypoints.fs2 (7,352) 2007-09-08 12:18
patch waypointflying.patch (454) 2012-12-08 11:13
patch waypointflying_v2.patch (1,503) 2012-12-08 16:25

2007-09-08 16:11   
Happens in retail too. Ships in a wing follow the orders of the first ship in the wing. Always have done. I'd love to see this fixed but I'd imagine it would break a huge number of missions unless it was applied carefully.
Ransom Arceihn   
2007-09-08 16:32   

Well, all right then. But it only seems to affect things when the order means stopping - two separate waypoint orders doesn't result in the second fighter going to the first one's waypoint, for instance.

And it seems strange that getting shot fixes it.
2008-03-21 18:48   
* BUMP *

So, is this not something that we can fix, or is it really a new bug?
2008-03-21 18:55   
To be honest it's something I'd really like to see fixed as it's pretty silly that just cause a ship is in a wing you can't give it new orders.

The problem is whether it would break missions. In general it shouldn't. If the mission designer wanted a wing to do something they usually would have told them to do it rather than give the lead ship new orders. But if someone made that mistake they wouldn't have spotted it during playtesting.

I'm tempted to say that we should fix it and see what it breaks.
2008-07-17 12:36   
Not going to work on this.
2009-02-02 15:40   
I'll wait till 3.6.10 comes out and then see if changing this breaks anything.
2012-12-07 09:53   
Changing the status here to make it more visible
Admiral MS   
2012-12-08 10:46   
(Last edited: 2012-12-08 11:12)
So I found the reason why this happens and I can fix it but the question is: What's the right behaviour in this case?
I see the following options:
- Ship should follow its own waypoint path unless the wingleader has the same waypoint path and order
- Ship should follow its own waypoint path unless the wingleader has any waypoint order
As usual with ai changes this may or may not break old missions.
Currently in case the formation waypoint flying starts, the target path of all ships in the wing will get overridden with the path of the wing leader.

Additionally there is the option to drop the formation flag in this case to prevent it from running through all the checks in ai_formation() every frame. When shooting at the fighter that flag gets removed and when given a new waypoint order it gets added anyway.

Edit: Uploaded patch that fixes behaviour for the case presented in the test mission (second option)

Admiral MS   
2012-12-08 16:24   
As suggested the fix now comes with an ai_profiles.tbl setting named
$fix ai path order bug: YES / NO

Behaviour with YES is:
Ship should follow its own waypoint path unless the wingleader has the same waypoint path and order

Uploaded it as waypointflying_v2.patch
2012-12-08 22:15   
Fix committed to trunk@9412.

Issue History
2007-09-08 12:18Ransom ArceihnNew Issue
2007-09-08 12:18Ransom ArceihnFile Added: waypoints.fs2
2007-09-08 16:11karajormaNote Added: 0008512
2007-09-08 16:32Ransom ArceihnNote Added: 0008513
2008-03-21 18:48taylorNote Added: 0009000
2008-03-21 18:55karajormaNote Added: 0009005
2008-04-04 20:31taylorStatusnew => assigned
2008-04-04 20:31taylorAssigned To => taylor
2008-07-17 12:36taylorNote Added: 0009472
2008-07-17 12:36taylorAssigned Totaylor =>
2008-07-17 12:36taylorStatusassigned => new
2009-02-02 15:39karajormaStatusnew => assigned
2009-02-02 15:39karajormaAssigned To => karajorma
2009-02-02 15:40karajormaNote Added: 0010641
2012-10-28 09:47karajormaAssigned Tokarajorma =>
2012-12-07 09:53The_ENote Added: 0014346
2012-12-07 09:53The_EStatusassigned => acknowledged
2012-12-08 10:46Admiral MSNote Added: 0014357
2012-12-08 11:12Admiral MSNote Edited: 0014357bug_revision_view_page.php?bugnote_id=14357#r290
2012-12-08 11:13Admiral MSFile Added: waypointflying.patch
2012-12-08 16:24Admiral MSNote Added: 0014361
2012-12-08 16:25Admiral MSFile Added: waypointflying_v2.patch
2012-12-08 18:57ZacamAssigned To => Zacam
2012-12-08 18:57ZacamStatusacknowledged => code review
2012-12-08 22:15ZacamChangeset attached => fs2open trunk r9412
2012-12-08 22:15ZacamNote Added: 0014371
2012-12-08 22:15ZacamStatuscode review => resolved
2012-12-08 22:15ZacamResolutionopen => fixed
2012-12-09 22:35Goober5000Assigned ToZacam => Admiral MS