2020-08-13 03:59 EDT

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0001870FSSCPgameplaypublic2012-01-09 13:07
Assigned ToGoober5000 
StatusresolvedResolutionno change required 
PlatformDELL Dimension 9200OSWindows VistaOS VersionUltimate 32-bit
Product Version 
Target VersionFixed in Version 
Summary0001870: Sometimes, hits-left is not evalued before the ship is destroyed.
DescriptionI think there's some kind of issue with this SEXP.

Warzone 6th mission. (I upload it). (Although I haven't tried, you should be able to use it with retail data, because Warzone only has one -shp.tbm used to add GTE Vidar which is not used in this mission).

SC Guari (a SC Raksasha), has the following arrival cue:

--Comm Node

After both initial SC Cains are destroyed, the Shivan Comm-Node gets heavily bombarded and beamed by allied forces. Then, approximately in about 25% of the mission runs, this SEXP is not evaluated before the Shivan Comm is destroyed and the SC Guari never arrives, breaking the mission.
TagsNo tags attached.
Attached Files




phreak (developer)

Try the next nightly, the sexp was bailing if the ship was destroyed. I just had it return 0.


chief1983 (administrator)

Last edited: 2009-01-15 11:03

I wonder why it was originally decided that you can't evaluate it when the ship has been destroyed. Seems like it should have been an obvious 0 all along if that works.


phreak (developer)

No idea, but it may also be an oversight on the mission designer

- or
   - is-destroyed-delay
      - 0
      - Comm Node
   - <
      - hits-left
         - Comm Node
      - 12


ARSPR (reporter)

Last edited: 2009-01-15 13:00

Ok, I'll test it ASAP

OTOH, hits-left-subsystem is also buggy. It also doesn't return 0 for destroyed ships.

(I upload a test mission where you can bomb or laser to death two Cains. hits-left test is enabled for both at < 5%. Also "Bomb me" engine is tested at < 80% (this test training message is delayed 5 seconds)).

Nevertheless, although I really think that this is a TRUE bug because a destroyed ship does have 0 hits left in both its hull and its subsystems, maybe this fix can break old missions which were made without thinking about it. SCP crew should discuss about it...

A possible example. You have to weaken Comm below 20 while keeping your targe alive. Now there's no need for an additional check about if the ship has been destroyed or not. A destroyed ship wouldn't trigger the hits-left-subsystem (Comm) < 20 check.

Maybe, although both SEXPs are buggy in strict sense, the best thing to do is leaving them untouched. I would just add a warning in their FRED help text, telling the FREDer that they are not evaluated for destroyed ships. (A good FREDer could always fix his missions with phreak's coding).

EDITED -----

As expected, 5039 makes hits-left=0 for destroyed ships. But as told above, really wanted?


Goober5000 (administrator)

That's an interesting question.


Goober5000 (administrator)

Okay. Well, first we have coding precedent across nearly every sexp in the code (both retail and FSO) that deal with ships. And that precedent is to return NAN_FOREVER if the ship is destroyed or departed. This applies to shields-left, hits-left-subsystem, is-ship-visible, and many other sexps. It may trigger a double take in certain situations (such as hits-left when a ship is destroyed, as mentioned here) but it is well-defined and it's consistent.

So I'm declaring this as a mission bug and not a code bug. I'm reverting the "fix" and marking this ticket as "no change required".

+Related Changesets

-Issue History
Date Modified Username Field Change
2009-01-14 15:44 ARSPR New Issue
2009-01-14 15:44 ARSPR File Added: WarzoneE1M6.fs2
2009-01-14 20:06 phreak Note Added: 0010527
2009-01-14 20:07 phreak Status new => assigned
2009-01-14 20:07 phreak Assigned To => phreak
2009-01-14 22:37 chief1983 Note Added: 0010528
2009-01-14 22:37 chief1983 Status assigned => feedback
2009-01-14 23:08 phreak Note Added: 0010530
2009-01-14 23:08 phreak Status feedback => assigned
2009-01-15 10:25 ARSPR Note Added: 0010533
2009-01-15 10:27 ARSPR Note Edited: 0010533
2009-01-15 10:27 ARSPR File Added: Hits_left_test.fs2
2009-01-15 10:45 ARSPR Note Edited: 0010533
2009-01-15 10:51 ARSPR Note Edited: 0010533
2009-01-15 11:03 chief1983 Note Edited: 0010528
2009-01-15 13:00 ARSPR Note Edited: 0010533
2009-01-17 19:35 Goober5000 Note Added: 0010539
2009-01-17 22:57 Goober5000 Note Added: 0010540
2009-01-17 22:57 Goober5000 Assigned To phreak => Goober5000
2009-01-17 22:57 Goober5000 Status assigned => resolved
2009-01-17 22:57 Goober5000 Resolution open => no change required
2012-01-05 17:55 Goober5000 Changeset attached => Import 2012-01-05 17:52:05 trunk r5041
2012-01-09 13:07 Goober5000 Changeset attached => fs2open_websvn trunk r5041
+Issue History