View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003110 | FSSCP | HUD | public | 2014-09-29 15:29 | 2014-09-30 03:27 |
Reporter | MjnMixael | Assigned To | MageKing17 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | PC | OS | Windows | OS Version | Win7 |
Product Version | 3.7.2 RC4 | ||||
Fixed in Version | 3.7.2 | ||||
Summary | 0003110: Message Brackets not displayed with 'Invisible to Friendlies' flag | ||||
Description | You 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 Reproduce | Play the attached mission. The Hercules will not get message brackets drawn even though it is specified as the sender of the message. | ||||
Additional Information | This 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. | ||||
Tags | No tags attached. | ||||
|
|
|
hudtarget.cpp.patch (915 bytes)
Index: code/hud/hudtarget.cpp =================================================================== --- code/hud/hudtarget.cpp (revision 11088) +++ code/hud/hudtarget.cpp (working copy) @@ -3290,7 +3290,11 @@ // Karajorma - If we've gone to all the trouble to make our friendly ships stealthed they shouldn't then give away // their position cause they're feeling chatty - if ( Ships[Message_shipnum].flags2 & SF2_FRIENDLY_STEALTH_INVIS ) { + // MageKing17 - Make the check see if they're actually stealthed at the time, and may as well include a check for + // being hidden from sensors, too; logic copied from a similar check in hudescort.cpp + if ( (Ships[Message_shipnum].flags & SF_HIDDEN_FROM_SENSORS) + || ((Ships[Message_shipnum].flags2 & SF2_STEALTH) && ((Ships[Message_shipnum].team != Player_ship->team) || (Ships[Message_shipnum].flags2 & SF2_FRIENDLY_STEALTH_INVIS))) + ) { return; } |
|
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. |
|
Yup that works. |
|
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. |
|
All issues with friendly-stealth-invisible should now be resolved. |
fs2open: trunk r11095 2014-09-29 23:51 Ported: N/A Details Diff |
MageKing17's patch for Mantis 0003110: Message Brackets not displayed with 'Invisible to Friendlies' flag |
Affected Issues 0003110 |
|
mod - /trunk/fs2_open/code/hud/hudtarget.cpp | Diff File | ||
fs2open: trunk r11096 2014-09-30 00:02 Ported: N/A Details Diff |
and on the subject of Mantis 0003110: fix the multi_sexp_deal_with_ship_flag issue that MageKing17 noticed, and tweak a sexp to be more clear |
Affected Issues 0003110 |
|
mod - /trunk/fs2_open/code/parse/sexp.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-09-29 15:29 | MjnMixael | New Issue | |
2014-09-29 15:30 | MjnMixael | File Added: 3110.fs2 | |
2014-09-29 18:10 | MageKing17 | File Added: hudtarget.cpp.patch | |
2014-09-29 18:14 | MageKing17 | Note Added: 0016314 | |
2014-09-29 18:14 | MageKing17 | Assigned To | => MageKing17 |
2014-09-29 18:14 | MageKing17 | Status | new => code review |
2014-09-29 18:15 | MageKing17 | Note Edited: 0016314 | |
2014-09-29 20:23 | MjnMixael | Note Added: 0016315 | |
2014-09-30 02:52 | Goober5000 | Note Added: 0016316 | |
2014-09-30 03:14 | Goober5000 | Changeset attached | => fs2open trunk r11095 |
2014-09-30 03:25 | Goober5000 | Changeset attached | => fs2open trunk r11096 |
2014-09-30 03:27 | Goober5000 | Note Added: 0016317 | |
2014-09-30 03:27 | Goober5000 | Status | code review => resolved |
2014-09-30 03:27 | Goober5000 | Resolution | open => fixed |
2014-09-30 03:27 | Goober5000 | Fixed in Version | => 3.7.2 |