Source Code Project Mantis - FSSCP
View Issue Details
0003110FSSCPHUDpublic2014-09-29 11:292014-09-29 23:27
Assigned ToMageKing17 
PlatformPCOSWindowsOS VersionWin7
Product Version3.7.2 RC4 
Target VersionFixed in Version3.7.2 
Summary0003110: Message Brackets not displayed with 'Invisible to Friendlies' flag
DescriptionYou have a ship in mission. You have checked the box 'Invisible to Friendlies when Stealthed'. The ship is NOT stealthed and can be targeted. If it sends a message, FSO will not draw message brackets around the ship.
Steps To ReproducePlay the attached mission. The Hercules will not get message brackets drawn even though it is specified as the sender of the message.
Additional InformationThis is undesirable behavior because the cause is unclear. 'Invisible to Friendlies when Stealthed' says to me that it will do stuff when the ship is Stealthed and it won't do stuff when it's NOT Stealthed. However this is not the case. In some part of the targeting code, FSO is considering the ship to be Stealthed.
TagsNo tags attached.
Attached Files? 3110.fs2 (5,176) 2014-09-29 11:30
patch hudtarget.cpp.patch (915) 2014-09-29 14:10

2014-09-29 14:14   
(Last edited: 2014-09-29 14:15)
Patch uploaded; compiled and tested to fix the issue with the provided mission file. Glancing through the code, there might be other instances of SF2_FRIENDLY_STEALTH_INVIS being used where it assumes the ship is also stealthed at the time. For instance, multi_sexp_deal_with_ship_flag() clears the player's target if they're targeting a ship and you apply SF2_FRIENDLY_STEALTH_INVIS to it... regardless of whether or not it had it before and regardless of whether or not it's stealthed (and regardless of whether or not it's on the same team, even!). Not sure if that fits within the scope of this issue, though.

2014-09-29 16:23   
Yup that works.
2014-09-29 22:52   
Yeah, MageKing17 is correct. SF2_FRIENDLY_STEALTH_INVIS controls what happens when the ship is stealthed; it says nothing about whether the ship currently happens to be stealthed or not.
2014-09-29 23:27   
All issues with friendly-stealth-invisible should now be resolved.

Issue History
2014-09-29 11:29MjnMixaelNew Issue
2014-09-29 11:30MjnMixaelFile Added: 3110.fs2
2014-09-29 14:10MageKing17File Added: hudtarget.cpp.patch
2014-09-29 14:14MageKing17Note Added: 0016314
2014-09-29 14:14MageKing17Assigned To => MageKing17
2014-09-29 14:14MageKing17Statusnew => code review
2014-09-29 14:15MageKing17Note Edited: 0016314bug_revision_view_page.php?bugnote_id=16314#r922
2014-09-29 16:23MjnMixaelNote Added: 0016315
2014-09-29 22:52Goober5000Note Added: 0016316
2014-09-29 23:14Goober5000Changeset attached => fs2open trunk r11095
2014-09-29 23:25Goober5000Changeset attached => fs2open trunk r11096
2014-09-29 23:27Goober5000Note Added: 0016317
2014-09-29 23:27Goober5000Statuscode review => resolved
2014-09-29 23:27Goober5000Resolutionopen => fixed
2014-09-29 23:27Goober5000Fixed in Version => 3.7.2