View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002533 | FSSCP | SEXPs | public | 2011-11-02 01:11 | 2011-11-09 09:24 |
| Reporter | Axem | Assigned To | Eli2 | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0002533: is-event-true-msecs doesn't work past 32,768 ms | ||||
| Description | Oddly enough this is (2^16)/2! How interesting! Anything above the magic number will have the event happen right away. Repro mission attached. Press 1 to have a ship warp in 30,000ms from the time pressed. Press 2 to have a ship warp in 40,000ms from the time pressed. Use time compression to wait out the longer periods of time! | ||||
| Tags | No tags attached. | ||||
|
2011-11-02 01:11
|
|
|
|
Attached fix. |
|
|
Committed to trunk in rev 7938 |
|
|
Reverted the change again. This fix seems to introduce a behavioural change, breaking existing missions. |
|
2011-11-06 01:53
|
eventDelayFix2.svn.patch (578 bytes)
Index: code/parse/sexp.cpp
===================================================================
--- code/parse/sexp.cpp
+++ code/parse/sexp.cpp
@@ -12650,10 +12650,15 @@ int sexp_event_delay_status( int n, int want_true, bool use_msecs = false)
return SEXP_FALSE;
}
- delay = i2f(eval_num(CDR(n)));
+ uint64_t tempDelay = eval_num(CDR(n));
if (use_msecs) {
- delay = delay / 1000l;
+ tempDelay = tempDelay << 16;
+ tempDelay = tempDelay / 1000;
+
+ delay = (fix) tempDelay;
+ } else {
+ delay = i2f(tempDelay);
}
for (i = 0; i < Num_mission_events; i++ ) {
|
|
|
Attached a less invasive patch. |
|
|
Tested and committed. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-11-02 01:11 | Axem | New Issue | |
| 2011-11-02 01:11 | Axem | File Added: MSecsTest.fs2 | |
| 2011-11-02 02:46 | Eli2 | File Added: eventTrueMsecsFix.patch | |
| 2011-11-02 02:46 | Eli2 | Note Added: 0012916 | |
| 2011-11-02 11:39 | The_E | Note Added: 0012917 | |
| 2011-11-02 11:39 | The_E | Status | new => resolved |
| 2011-11-02 11:39 | The_E | Resolution | open => fixed |
| 2011-11-02 11:39 | The_E | Assigned To | => The_E |
| 2011-11-02 11:39 | The_E | Assigned To | The_E => Eli2 |
| 2011-11-02 11:39 | The_E | Status | resolved => feedback |
| 2011-11-02 11:39 | The_E | Resolution | fixed => reopened |
| 2011-11-02 11:39 | The_E | Status | feedback => assigned |
| 2011-11-02 11:40 | The_E | Status | assigned => resolved |
| 2011-11-02 11:40 | The_E | Resolution | reopened => fixed |
| 2011-11-05 19:19 | The_E | Note Added: 0012929 | |
| 2011-11-05 19:19 | The_E | Status | resolved => feedback |
| 2011-11-05 19:19 | The_E | Resolution | fixed => reopened |
| 2011-11-06 01:53 | Eli2 | File Added: eventDelayFix2.svn.patch | |
| 2011-11-06 01:53 | Eli2 | File Deleted: eventTrueMsecsFix.patch | |
| 2011-11-06 01:54 | Eli2 | Note Added: 0012930 | |
| 2011-11-06 04:58 | Eli2 | Status | feedback => new |
| 2011-11-09 09:24 | The_E | Note Added: 0012944 | |
| 2011-11-09 09:24 | The_E | Status | new => resolved |
| 2011-11-09 09:24 | The_E | Resolution | reopened => fixed |