View Issue Details

IDProjectCategoryView StatusLast Update
0002885FSSCPSEXPspublic2014-07-09 21:21
ReporterFUBAR-BDHR Assigned ToFUBAR-BDHR  
PrioritylowSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version3.6.19 
Target Version3.7.2Fixed in Version3.7.2 
Summary0002885: Requested sexp for enable/disable primitive sensors
DescriptionAs requested here: http://www.hard-light.net/forums/index.php?topic=83615.msg1670321#msg1670321

Simple 2 line patch for adding this ability attached.
TagsNo tags attached.

Activities

FUBAR-BDHR

2013-06-03 21:31

developer  

primitive-sensor.patch (1,029 bytes)   
Index: ship/ship.cpp
===================================================================
--- ship/ship.cpp	(revision 9522)
+++ ship/ship.cpp	(working copy)
@@ -365,6 +365,7 @@
 	//{SF_HIDDEN_FROM_SENSORS,		"hidden-from-sensors",			1,	},
 	//{SF2_STEALTH,					"stealth",						2,	},
 	//{SF2_FRIENDLY_STEALTH_INVIS,	"friendly-stealth-invisible",	2,	},
+	{SF2_PRIMITIVE_SENSORS,			"primitive-sensors",			2,	},
 	{SF2_AFTERBURNER_LOCKED,		"afterburners-locked",			2,	},
 	{SF2_PRIMARIES_LOCKED,			"primaries-locked",				2,	},
 	{SF2_SECONDARIES_LOCKED,		"secondaries-locked",			2,	},
Index: ship/ship.h
===================================================================
--- ship/ship.h	(revision 9522)
+++ ship/ship.h	(working copy)
@@ -412,7 +412,7 @@
 	int flag_list;						// is this flag in the 1st or 2nd ship flags list?
 } ship_flag_name;
 
-#define MAX_SHIP_FLAG_NAMES					9
+#define MAX_SHIP_FLAG_NAMES					10
 extern ship_flag_name Ship_flag_names[];
 
 // states for the flags variable within the ship structure
primitive-sensor.patch (1,029 bytes)   

chief1983

2014-07-09 20:42

administrator  

primitive-sensor_r10904.diff (1,039 bytes)   
Index: code/ship/ship.cpp
===================================================================
--- code/ship/ship.cpp	(revision 10904)
+++ code/ship/ship.cpp	(working copy)
@@ -374,6 +374,7 @@
 	{SF2_STEALTH,					"stealth",						2,	},
 	{SF2_FRIENDLY_STEALTH_INVIS,	"friendly-stealth-invisible",	2,	},
 	{SF2_HIDE_SHIP_NAME,			"hide-ship-name",				2,	},
+	{SF2_PRIMITIVE_SENSORS,			"primitive-sensors",			2,	},
 	{SF2_AFTERBURNER_LOCKED,		"afterburners-locked",			2,	},
 	{SF2_PRIMARIES_LOCKED,			"primaries-locked",				2,	},
 	{SF2_SECONDARIES_LOCKED,		"secondaries-locked",			2,	},
Index: code/ship/ship.h
===================================================================
--- code/ship/ship.h	(revision 10904)
+++ code/ship/ship.h	(working copy)
@@ -424,7 +424,7 @@
 	int flag_list;						// is this flag in the 1st or 2nd ship flags list?
 } ship_flag_name;
 
-#define MAX_SHIP_FLAG_NAMES					16
+#define MAX_SHIP_FLAG_NAMES					17
 extern ship_flag_name Ship_flag_names[];
 
 // states for the flags variable within the ship structure
primitive-sensor_r10904.diff (1,039 bytes)   

chief1983

2014-07-09 20:42

administrator   ~0016045

Uploaded version of patch that might work against current trunk, if 17 isn't too high a value for MAX_SHIP_FLAG_NAMES.

chief1983

2014-07-09 20:46

administrator   ~0016046

Looks fine according to myself, The E and MageKing17, committing.

chief1983

2014-07-09 20:49

administrator   ~0016047

Fix committed to trunk@10906.

Related Changesets

fs2open: trunk r10906

2014-07-09 17:12

chief1983


Ported: N/A

Details Diff
Fix Mantis 2885 - SEXP flag to enable/disable primitive sensors, from FUBAR. Affected Issues
0002885
mod - /trunk/fs2_open/code/ship/ship.h Diff File
mod - /trunk/fs2_open/code/ship/ship.cpp Diff File

Issue History

Date Modified Username Field Change
2013-06-03 21:31 FUBAR-BDHR New Issue
2013-06-03 21:31 FUBAR-BDHR Status new => assigned
2013-06-03 21:31 FUBAR-BDHR Assigned To => FUBAR-BDHR
2013-06-03 21:31 FUBAR-BDHR File Added: primitive-sensor.patch
2013-06-03 21:31 FUBAR-BDHR Status assigned => code review
2014-07-09 20:42 chief1983 File Added: primitive-sensor_r10904.diff
2014-07-09 20:42 chief1983 Note Added: 0016045
2014-07-09 20:46 chief1983 Note Added: 0016046
2014-07-09 20:49 chief1983 Changeset attached => fs2open trunk r10906
2014-07-09 20:49 chief1983 Note Added: 0016047
2014-07-09 20:49 chief1983 Status code review => resolved
2014-07-09 20:49 chief1983 Resolution open => fixed
2014-07-09 21:21 chief1983 Fixed in Version => 3.7.2