2019-10-18 23:51 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002470FSSCPtablespublic2011-10-05 11:23
Reporterbigchunk1 
Assigned Toniffiwan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.13 
Target VersionFixed in Version3.6.14 
Summary0002470: $Flags: ("untargetable") does not work on turret subsystems
DescriptionIf you have a turret subsystem on a ship and try to add the "untargetable" flag to it in the ships.tbl, the turret will remain targetable in game. The flag will not cause any errors or warnings in debug, but will fail to work on turrets.
Additional InformationI have included a test mod for this issue.
http://www.mediafire.com/?14h6gt6v5c4m4ky
TagsNo tags attached.
Attached Files
  • ? file icon ufen-shp.tbm (11,291 bytes) 2011-10-03 06:40
  • ? file icon TestBC102.fs2 (5,321 bytes) 2011-10-03 06:40
  • patch file icon mantis-2470.patch (868 bytes) 2011-10-03 06:42 -
    Index: code/hud/hudtarget.cpp
    ===================================================================
    --- code/hud/hudtarget.cpp	(revision 7852)
    +++ code/hud/hudtarget.cpp	(working copy)
    @@ -1694,6 +1694,10 @@
     	for (A=GET_FIRST(&target_shipp->subsys_list); A!=END_OF_LIST(&target_shipp->subsys_list); A=GET_NEXT(A))  {
     		// get a turret
     		if (A->system_info->type == SUBSYSTEM_TURRET) {
    +			// niffiwan: ignore untargetable turrets 
    +			if ( A->flags & SSF_UNTARGETABLE ) {
    +				continue;
    +			}
     			// check turret has hit points and has a weapon
     			if ( (A->current_hits > 0) && (A->weapons.num_primary_banks > 0 || A->weapons.num_secondary_banks > 0) ) {
     				if ( !only_player_target || (A->turret_enemy_objnum == OBJ_INDEX(Player_obj)) ) {
    @@ -6711,4 +6715,4 @@
     	} else {
     		gr_line(fl2i(x2),fl2i(y2-1),fl2i(x5),fl2i(y5-1));
     	}
    -}
    \ No newline at end of file
    +}
    
    patch file icon mantis-2470.patch (868 bytes) 2011-10-03 06:42 +

-Relationships
+Relationships

-Notes

~0012748

Zacam (administrator)

I may be wrong here, but it doesn't help when the turret you are setting to "untargetable" also happens to be loaded with a weapon, as I'm pretty sure it was not meant to work that way.

AFAIR, "untargetable" (along with "damage as hull" "no aggregate" in conjunction) are to be used with -empty- turrets.

~0012763

MjnMixael (manager)

But there are cases where it's desirable to have an untargetable turret that still fires weapons. Case in point.. my Construction Drone..

If this is not a bug.. then could we get it as a feature/expansion of the current flag?

~0012775

Goober5000 (administrator)

I was the one who implemented "untargetable", and this was just an oversight. Even though turrets are subsystems, they're treated slightly differently than bog-standard subsystems.

~0012876

niffiwan (developer)

Last edited: 2011-10-03 06:41

Fix committed to trunk 7853

Note that the test mission triggers a different bug which I've mantised here:
http://scp.indiegames.us/mantis/view.php?id=2513

I used the attached files to test this issue was fixed, I just swapped the untargetable Fenris for an Aten.

When the patch arrives in a nightly, could you please test this with the new mission file & table?

Thanks

~0012877

niffiwan (developer)

Here's the windows nightly:
http://www.hard-light.net/forums/index.php?topic=78498.0

~0012878

MjnMixael (manager)

Tested and works as expected on my end.

~0012881

niffiwan (developer)

Thanks for testing MjnMixael

~0012882

Goober5000 (administrator)

Changed from closed to resolved, since that has been the de facto convention. (Fixed issues are resolved; issues that aren't fixed for whatever reason are closed.)
+Notes

-Issue History
Date Modified Username Field Change
2011-07-12 00:53 bigchunk1 New Issue
2011-07-17 02:20 Zacam Note Added: 0012748
2011-08-12 19:53 MjnMixael Note Added: 0012763
2011-08-21 21:59 Goober5000 Note Added: 0012775
2011-10-02 00:23 niffiwan Status new => assigned
2011-10-02 00:23 niffiwan Assigned To => niffiwan
2011-10-03 06:39 niffiwan Note Added: 0012876
2011-10-03 06:40 niffiwan File Added: ufen-shp.tbm
2011-10-03 06:40 niffiwan File Added: TestBC102.fs2
2011-10-03 06:40 niffiwan Status assigned => feedback
2011-10-03 06:41 niffiwan Note Edited: 0012876
2011-10-03 06:41 niffiwan Note Edited: 0012876
2011-10-03 06:42 niffiwan File Added: mantis-2470.patch
2011-10-03 17:39 niffiwan Note Added: 0012877
2011-10-03 22:42 MjnMixael Note Added: 0012878
2011-10-05 06:30 niffiwan Note Added: 0012881
2011-10-05 06:30 niffiwan Status feedback => closed
2011-10-05 06:30 niffiwan Resolution open => fixed
2011-10-05 06:30 niffiwan Fixed in Version => 3.6.14
2011-10-05 11:23 Goober5000 Note Added: 0012882
2011-10-05 11:23 Goober5000 Status closed => resolved
+Issue History