View Issue Details

IDProjectCategoryView StatusLast Update
0002467FSSCPgameplaypublic2011-08-27 02:37
ReporterSpoon Assigned Toniffiwan  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.13 
Summary0002467: untargeted heat seekers ignore ship protect
Description^
TagsNo tags attached.

Activities

2011-08-24 12:27

 

mantis2467.patch (1,180 bytes)   
Index: code/weapon/weapons.cpp
===================================================================
--- code/weapon/weapons.cpp	(revision 7523)
+++ code/weapon/weapons.cpp	(working copy)
@@ -697,6 +697,11 @@
 	{
 		Warning(LOCATION,"Weapon %s has the \"inherit parent target\" flag, but not the \"child\" flag.  No changes in behavior will occur.", weaponp->name);
 	}
+
+	if (!(weaponp->wi_flags & WIF_HOMING_HEAT) && (weaponp->wi_flags2 & WIF2_UNTARGETED_HEAT_SEEKER)) 
+	{
+		Warning(LOCATION,"Weapon %s has the \"untargeted heat seeker\" flag, but Homing Type is not set to \"HEAT\".", weaponp->name);
+	}
 }
 
 void parse_shockwave_info(shockwave_create_info *sci, char *pre_char)
@@ -3876,7 +3881,9 @@
 			}*/
 
 			//WMC - Spawn weapons shouldn't go for protected ships
-			if((objp->flags & OF_PROTECTED) && (wp->weapon_flags & WF_SPAWNED))
+			// ditto for untargeted heat seekers - niffiwan
+			if((objp->flags & OF_PROTECTED) &&
+			  ((wp->weapon_flags & WF_SPAWNED) || (wip->wi_flags2 & WIF2_UNTARGETED_HEAT_SEEKER)))
 				continue;
 
 			// Spawned weapons should never home in on their parent - even in multiplayer dogfights where they would pass the iff test below
mantis2467.patch (1,180 bytes)   

niffiwan

2011-08-24 12:30

developer   ~0012777

Spoon - are you able to provide a simple test mission so I can test my patch?

Alternatively, I could provide a Linux binary for you to test with.

If neither of those will work, let me know and I'll see what I can do about getting VS2010 Express on a PC at work so I can compile a Windows binary.

2011-08-24 13:47

 

Heatseekers.fs2 (6,642 bytes)

2011-08-24 13:47

 

untargeted-wep.tbm (248 bytes)

Spoon

2011-08-24 13:49

reporter   ~0012778

There, made the tornado an untargeted heatseeker with the .tbm
Player is protected in the test mission.

niffiwan

2011-08-25 11:38

developer   ~0012780

Thanks for the mission. Testing seems to work fine, I just need to get someone to commit the patch now...

Zacam

2011-08-26 00:18

administrator   ~0012781

Patch with minor variation ( %s is now '%s' ) Committed to Trunk r7537.

Spoon

2011-08-26 22:39

reporter   ~0012785

I do believe this issue can be flagged as resolved :)

Goober5000

2011-08-27 02:37

administrator   ~0012787

Fixed in r7537. Crediting niffiwan.

Issue History

Date Modified Username Field Change
2011-07-08 21:02 Spoon New Issue
2011-08-24 12:27 niffiwan File Added: mantis2467.patch
2011-08-24 12:30 niffiwan Note Added: 0012777
2011-08-24 13:47 Spoon File Added: Heatseekers.fs2
2011-08-24 13:47 Spoon File Added: untargeted-wep.tbm
2011-08-24 13:49 Spoon Note Added: 0012778
2011-08-25 11:38 niffiwan Note Added: 0012780
2011-08-26 00:18 Zacam Note Added: 0012781
2011-08-26 02:48 Zacam Assigned To => Zacam
2011-08-26 02:48 Zacam Status new => feedback
2011-08-26 22:39 Spoon Note Added: 0012785
2011-08-27 02:37 Goober5000 Note Added: 0012787
2011-08-27 02:37 Goober5000 Assigned To Zacam => niffiwan
2011-08-27 02:37 Goober5000 Status feedback => resolved
2011-08-27 02:37 Goober5000 Resolution open => fixed