View Issue Details

IDProjectCategoryView StatusLast Update
0002470FSSCPtablespublic2011-10-05 15:23
Reporterbigchunk1 Assigned Toniffiwan  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.13 
Fixed 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.

Activities

Zacam

2011-07-17 06:20

administrator   ~0012748

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.

MjnMixael

2011-08-12 23:53

manager   ~0012763

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?

Goober5000

2011-08-22 01:59

administrator   ~0012775

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.

niffiwan

2011-10-03 10:39

developer   ~0012876

Last edited: 2011-10-03 10: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

2011-10-03 10:40

 

ufen-shp.tbm (11,291 bytes)

2011-10-03 10:40

 

TestBC102.fs2 (5,321 bytes)

2011-10-03 10:42

 

mantis-2470.patch (868 bytes)   
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
+}
mantis-2470.patch (868 bytes)   

niffiwan

2011-10-03 21:39

developer   ~0012877

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

MjnMixael

2011-10-04 02:42

manager   ~0012878

Tested and works as expected on my end.

niffiwan

2011-10-05 10:30

developer   ~0012881

Thanks for testing MjnMixael

Goober5000

2011-10-05 15:23

administrator   ~0012882

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.)

Issue History

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