2018-10-17 23:46 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002780FSSCPAIpublic2013-01-27 04:52
ReporterYarn 
Assigned Tom_m 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.15 
Target VersionFixed in Version 
Summary0002780: AI does not ensure clear line of sight when attacking subsystems
DescriptionSince revision 6511, any AI ship ordered to attack a subsystem will do so by getting close enough to the ship and firing in the direction of the subsystem without making any attempt to actually get a clear line of sight of that subsystem.
Steps To ReproduceYou can use the attached mission to see this in action. Delta 1, located 3000 meters behind the Orion, has the order to disable it. If played on retail or a revision before 6511, Delta 1 will fly under the Orion where the engine is located. If played on revision 6511 or later, he will simply fly straight into the engine wash and shoot in the direction of the engine. You can also call in Epsilon 1, who will warp in underneath the Orion and actually shoot the engine.
TagsNo tags attached.
Attached Files
  • ? file icon SubsystemTest.fs2 (6,444 bytes) 2013-01-25 17:07
  • patch file icon mantis_2780.patch (629 bytes) 2013-01-27 04:02 -
    Index: code/ai/aibig.cpp
    ===================================================================
    --- code/ai/aibig.cpp	(revision 9509)
    +++ code/ai/aibig.cpp	(working copy)
    @@ -424,7 +424,7 @@
     
     			aip->path_goal_dist = 5;
     			subsys_path_num = aip->targeted_subsys->system_info->path_num;
    -			if ( ((aip->path_start) == -1 || (aip->mp_index != subsys_path_num)) && subsys_path_num <= pm->n_paths ) {
    +			if ( ((aip->path_start) == -1 || (aip->mp_index != subsys_path_num)) && subsys_path_num <= pm_t->n_paths ) {
     				// maybe create a new path
     				if ( subsys_path_num >= 0 ) {
     					Assert(aip->target_objnum >= 0);
    
    patch file icon mantis_2780.patch (629 bytes) 2013-01-27 04:02 +

-Relationships
+Relationships

-Notes

~0014660

Goober5000 (administrator)

Argh. Though if you narrowed down the behavior to a single revision, this is a very good bug ticket. Do you mean to say that the behavior was as normal in 6510 but changed in 6511?

~0014661

m_m (developer)

Ridiculously simple patch that fixes this is attached.
There might exist balance issues with existing missions which were designed with this bug.

~0014662

Goober5000 (administrator)

Any such balance issues (I doubt there are any) would be more than outweighed by the breakage to compatibility, not only with retail, but with all missions produced prior to 9/25/2010.

Good catch on the actual cause. I will commit your patch shortly, plus some other fixes that need to be made in that function.

~0014663

Goober5000 (administrator)

Fix committed to trunk@9512.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2013-01-25 17:07 Yarn New Issue
2013-01-25 17:07 Yarn File Added: SubsystemTest.fs2
2013-01-27 03:20 Goober5000 Note Added: 0014660
2013-01-27 04:02 m_m Note Added: 0014661
2013-01-27 04:02 m_m File Added: mantis_2780.patch
2013-01-27 04:07 m_m Assigned To => m_m
2013-01-27 04:07 m_m Status new => feedback
2013-01-27 04:40 Goober5000 Note Added: 0014662
2013-01-27 04:52 Goober5000 Changeset attached => fs2open trunk r9512
2013-01-27 04:52 Goober5000 Note Added: 0014663
2013-01-27 04:52 Goober5000 Status feedback => resolved
2013-01-27 04:52 Goober5000 Resolution open => fixed
+Issue History