|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002169||FSSCP||gameplay||public||2010-03-30 23:16||2010-12-13 02:33|
|Target Version||Fixed in Version|
|Summary||0002169: Stealth fighters do not have the stealth flag set in FRED|
|Description||Create a new mission in FRED. Place a stealthy ship, such as the Pegasus. Go into the ship flags editor... the stealth flag is not set.|
|Tags||No tags attached.|
Now, the real issue here is that the code sort of ignores SIF_STEALTH completely. It's parsed in ships.cpp, but the rest of the code only looks at the ship flag (SF2_STEALTH) to see if a ship is supposed to be stealthy. This is per design, as any ship might be designated stealthy in FRED, but it also makes the ships.tbl flag completely useless.
The attached patch fixes this, but it opens up another can of worms. For one, ships tabled as being stealth will actually _be_ stealthy now, even if a mission designer has not checked the requisite flag in FRED. This may have unintended consequences.
Whoa, wait a minute. This bug isn't even supposed to exist. See missionparse.cpp, line 2800:
// set certain flags that used to be in ship_info - Goober5000
if (Ship_info[p_objp->ship_class].flags & SIF_STEALTH)
p_objp->flags |= P_SF2_STEALTH;
if (Ship_info[p_objp->ship_class].flags & SIF_SHIP_CLASS_DONT_COLLIDE_INVIS)
p_objp->flags |= P_SF2_DONT_COLLIDE_INVIS;
All ships that are tabled as stealthy in ships.tbl should *also* appear as stealthy in FRED. I think this is exclusively a FRED bug, because AFAIK stealth ships work properly in FSO.
And note that your "can of worms" is actually the other way around. Stealth was always a class-specific flag in retail FS2; it wasn't until FSO came along that it became a ship-specific flag. So ships tabled as stealthy (e.g. Pegasus, Ptah) *should be stealthy*, and if not, we have problems.
|And yet, it does exist. The problem, I think, is that parse_object() is only called when parsing a mission (If you save the mission and load it again, the stealth flag is checked correctly). However, when adding a ship or changing the ship class in the ships editor, the code goes through ship_set() and ship_change_class() respectively, neither of which will transfer the stealth flag correctly.|
|Tested and committed in 6847.|
|2010-03-30 23:16||Goober5000||New Issue|
|2010-12-09 17:26||The_E||File Added: 2169.patch|
|2010-12-09 17:27||The_E||Note Added: 0012525|
|2010-12-10 03:47||Goober5000||Note Added: 0012532|
|2010-12-10 09:35||The_E||Note Added: 0012533|
|2010-12-13 02:33||Goober5000||Note Added: 0012550|
|2010-12-13 02:33||Goober5000||Assigned To||=> Goober5000|
|2010-12-13 02:33||Goober5000||Status||new => resolved|
|2010-12-13 02:33||Goober5000||Resolution||open => fixed|