View Issue Details

IDProjectCategoryView StatusLast Update
0000874FSSCPFREDpublic2006-03-27 18:53
ReporterShade Assigned To 
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionopen 
Summary0000874: percent-ships-destroyed sexp & directives
DescriptionNormally directives do not appear until it's possible to complete them, but this is not the case when using percent-ships-destroyed as opposed to, say, is_destroyed-delay. The directive will appear immediately even if the ships referenced are not in the mission yet.
Additional InformationFound by Dwin, see http://www.hard-light.net/forums/index.php/topic,39034.0.html for details.

Bare bones test mission comparing is-destroyed-delay to percent-ships-destroyed attached.
TagsNo tags attached.

Activities

2006-03-25 21:46

 

directive_test.fs2 (5,632 bytes)

Shade

2006-03-27 01:09

developer   ~0005251

Took a look at the source and found a possible cause: The sexp needs to return SEXP_CANT_EVAL if the percent is > 0 and none of the ships in question have arrived yet. An extra if before the rest of the sexp processing to check for this should do the trick.

Of course, I could be wrong, first time I took this close a look at the sexp code.

Goober5000

2006-03-27 05:25

administrator   ~0005263

Does the same thing happen in retail?

Shade

2006-03-27 09:22

developer   ~0005265

Retail does the same.

Goober5000

2006-03-27 14:40

administrator   ~0005267

Hmm. I'm not sure if we can fix this. We try to keep compatibility with retail for all things that would be noticeably different. Someone may have relied on this behavior, in which case "fixing" it would create a bug.

Shade

2006-03-27 15:06

developer   ~0005268

Last edited: 2006-03-27 15:08

Fair enough, it's easy enough to work around it using other sexps or chaining. Might be a good idea to point out this behaviour in the sexp help text though. I'll let the man know how to avoid the problem if it turns out he absolutely needs to use this sexp for something directive related :)

edited on: 03-27-06 10:08

edited on: 03-27-06 10:08

Goober5000

2006-03-27 18:53

administrator   ~0005269

K. Closing then.

Issue History

Date Modified Username Field Change
2006-03-25 21:46 Shade New Issue
2006-03-25 21:46 Shade File Added: directive_test.fs2
2006-03-27 01:09 Shade Note Added: 0005251
2006-03-27 05:25 Goober5000 Note Added: 0005263
2006-03-27 09:22 Shade Note Added: 0005265
2006-03-27 14:40 Goober5000 Note Added: 0005267
2006-03-27 15:06 Shade Note Added: 0005268
2006-03-27 15:08 Shade Note Edited: 0005268
2006-03-27 15:08 Shade Note Edited: 0005268
2006-03-27 18:53 Goober5000 Status new => closed
2006-03-27 18:53 Goober5000 Note Added: 0005269