Source Code Project Mantis - FSSCP
View Issue Details
0000945FSSCPdockingpublic2006-06-11 15:152012-07-01 01:59
ReporterThe Trivial Psychic 
Assigned ToGoober5000 
PlatformAMD-2600+ 1GB DDR400 ATI9600XTOSWinXP in OGLOS VersionSP2
Product Version 
Target Version3.6.14Fixed in Version3.6.14 
Summary0000945: Non-Leader Docked Craft Attempt Maneuvers
DescriptionIf you dock one or more fighter craft to a larger ship, regardless of the fact that the larger ship is the dock leader, the smaller craft will still attempt to loiter, or engage nearby hostiles, causing the larger craft to spin about. If there are more than one small fighter docked to the large craft, it will also cause a degree of jerkiness to the spinning, since there are multiple fighters trying to maneuver the ship. The only way to avoid this is to give every ship except the dock leader, orders to play dead. If a wing is docked in this manner, the individual fighters in the wing must be given such an order, rather than the wing as a whole.

Unfortunately, this behaviour has been somewhat present since Retail, and I'm certain that one or more campaigns have taken advantage of it for comedic effect. Therefore, the best way I can see to preserve backwards compatibility would be to add a checkbox either in the docking controls or in the ship flags, that causes the ship to be inactive while docked, which includes engines and weapons primarily, though perhaps not turrets. Not sure if this should be engaged by default for any new missions created with a such-enabled FRED, so that when a designer docks 2 or more objects together, any object not deemed as the dock leader, automatically has this checkbox enabled. Missions previously created and loaded either in FRED or in FS, will default to the previous behaviour.
Steps To ReproduceTake a ship with multiple dockpoints, dock several fighters to it, make all hostile, then play in mission and watch the core ship spin around. Then, change the intial orders of the fighters to "play dead, 89", then replay the mission and watch how it behaves as it should.
Additional InformationThis was split from bug 0000530.
TagsNo tags attached.
parent of 0002557closed Goober5000 Jettison-cargo-delay doesn't work 
has duplicate 0001723closed Goober5000 Fighters/bombers with no orders will keep trying to fly around when docked to another ship 
Attached Files? MultiDockTest.fs2 (9,481) 2012-06-21 16:26
? MultiDockTest2.fs2 (10,171) 2012-06-25 09:54
patch patch2_for_945.patch (3,402) 2012-06-25 19:29
? 0MultiDockTest2.fs2 (10,183) 2012-06-25 19:32
patch patch3_for_945.patch (1,427) 2012-06-26 06:08

2010-10-22 09:00   
Is this still current?
2010-10-23 16:33   
I believe so.
2010-10-23 19:41   
(Last edited: 2010-10-23 19:45)
I second that believe so and know that the speed issue still happens as well. Probably should a relation to that one.

Guess I never filed that report in SCP Mantis because this one was here. It's still open in Diaspora Mantis so the problem still exists in some form.

2012-01-03 03:15   
Okay, here's how I propose to fix this:

If a ship is docked to something, and does not have any active goals or orders, then it should not perform evasive maneuvers.

Note, the decision should not be whether the ship is the "dock leader" or not, because the dock leader only matters as far as warping into the mission. It's not necessarily the ship that has control of the stack at a particular time.
2012-01-03 03:17   
I should also look through the code to see if I made that incorrect assumption anywhere else the dock leader is referenced.
Alan Bolte   
2012-01-03 03:51   
I don't understand the relationship to 2548. 2548 is for non-docked cargo containers, nav buoys, and sentry guns. In the patch I attached, all I had to do was give non-flyable 'ships' the same exclusion from shockwave-dodging that big ships have (which is handled separately from normal weapon dodging as far as I can tell). I guess the shockwave-dodging behavior might be feeding into the docking issues, I dunno.
2012-01-03 03:57   
Oh. I assumed 2548 was for docked cargo containers. Reopening then.
2012-06-19 21:08   
Would a kind soul be able to FRED up a test mission for this bug?
2012-06-21 16:26   
Test mission uploaded for no mods.
2012-06-22 05:23   
Thanks MjnMixael!
2012-06-25 06:35   
Okay, the case demonstrated in the test mission is now fixed. You should also draw up a test case for a fighter that isn't initially docked. (Initially docked ships have a particularly clean AI state that later-docked ships may not have.)
2012-06-25 09:54   
New mission uploaded, is that what you mean?

Also, the Argo's maneuverability in retail is impressive..
2012-06-25 18:52   
Hmm. As I feared, the Argo flips out in the second test mission. More detective work is needed.
2012-06-25 19:27   
I have patched most of the gaps, but the fighters still pulse their engines if shot at. I'll defer this for now, but revisit it later.
2012-06-25 19:29   
I've uploaded my current patch.
2012-06-25 19:33   
This new version of MultiDockTest assigns one of the ships to stay-still (the other is still play-dead) and changes the mission name.
2012-06-26 06:13   
I had a go at stopping the fighters from maneuvering by preventing them from entering AIM_EVADE_WEAPON mode (see patch3) - in testing with the 1st mission this has stopped most of the movement, but not all. There are a few "twitches" which don't appear to be being caused by changes in the AI mode, i.e. the fighters are staying in AIM_NONE the entire time. So I'm not sure what's causing this...
2012-06-27 01:32   
Well done niffiwan. Two out of three of those are solid fixes. The third I'm not sure about; will have to double-check.
2012-06-30 23:25   
All fixed!

Issue History
2006-06-11 15:15The Trivial PsychicNew Issue
2006-07-19 21:27Goober5000Additional Information Updated
2006-11-24 18:04Goober5000Relationship addedchild of 0000530
2007-10-22 01:41Goober5000Relationship deletedchild of 0000530
2010-10-22 09:00The_ENote Added: 0012422
2010-10-23 16:33Goober5000Note Added: 0012433
2010-10-23 19:41FUBAR-BDHRNote Added: 0012434
2010-10-23 19:45FUBAR-BDHRNote Edited: 0012434
2012-01-03 03:05Goober5000Relationship addedrelated to 0002557
2012-01-03 03:08Goober5000Relationship addedparent of 0002548
2012-01-03 03:09Goober5000Relationship replacedhas duplicate 0002557
2012-01-03 03:09Goober5000Relationship replacedparent of 0002557
2012-01-03 03:10Goober5000Prioritynormal => urgent
2012-01-03 03:10Goober5000Severityminor => major
2012-01-03 03:10Goober5000Target Version => 3.6.14
2012-01-03 03:15Goober5000Note Added: 0013020
2012-01-03 03:17Goober5000Note Added: 0013021
2012-01-03 03:51Alan BolteNote Added: 0013022
2012-01-03 03:57Goober5000Note Added: 0013023
2012-01-03 03:58Goober5000Relationship deletedparent of 0002548
2012-06-19 21:08niffiwanNote Added: 0013680
2012-06-21 16:26MjnMixaelFile Added: MultiDockTest.fs2
2012-06-21 16:26MjnMixaelNote Added: 0013695
2012-06-22 05:23niffiwanNote Added: 0013700
2012-06-25 06:33Goober5000Changeset attached => fs2open trunk r8914
2012-06-25 06:35Goober5000Note Added: 0013721
2012-06-25 09:54MjnMixaelFile Added: MultiDockTest2.fs2
2012-06-25 09:54MjnMixaelNote Added: 0013722
2012-06-25 18:52Goober5000Note Added: 0013723
2012-06-25 19:27Goober5000Note Added: 0013724
2012-06-25 19:29Goober5000File Added: patch2_for_945.patch
2012-06-25 19:29Goober5000Note Added: 0013725
2012-06-25 19:32Goober5000File Added: 0MultiDockTest2.fs2
2012-06-25 19:33Goober5000Note Added: 0013726
2012-06-26 06:08niffiwanFile Added: patch3_for_945.patch
2012-06-26 06:13niffiwanNote Added: 0013727
2012-06-27 01:32Goober5000Note Added: 0013729
2012-06-30 23:24Goober5000Changeset attached => fs2open trunk r8918
2012-06-30 23:25Goober5000Note Added: 0013740
2012-06-30 23:25Goober5000Statusassigned => resolved
2012-06-30 23:25Goober5000Resolutionopen => fixed
2012-06-30 23:25Goober5000Fixed in Version => 3.6.14
2012-06-30 23:25Goober5000Description Updatedbug_revision_view_page.php?rev_id=169#r169
2012-07-01 01:59Goober5000Relationship addedhas duplicate 0001723