Skip to content

Conversation

@Goober5000
Copy link
Contributor

A timestamp set to 1 means an immediate timestamp, and so the int version of timestamp_elapsed should account for that, just as it does in the TIMESTAMP and UI_TIMESTAMP versions. Normally the number comparison means the check will still work, but during mission initialization the timestamp code is not running. This caused destroy-before-mission ships to be added to the arrival list when they shouldn't have been.

Also fix logic in timestamp_elapsed_safe, where the TIMESTAMP and UI_TIMESTAMP versions were correct, but the int version had a bug dating back to retail that caused it to return true for uninitialized (zero) timestamps rather than false. Practically speaking, this fix has no effect because the function is only used in multiplayer and none of the instances use integer-0 to indicate uninitialized, but this will at least fix any uses in the future.

A timestamp set to 1 means an immediate timestamp, and so the `int` version of `timestamp_elapsed` should account for that, just as it does in the `TIMESTAMP` and `UI_TIMESTAMP` versions.  Normally the number comparison means the check will still work, but during mission initialization the timestamp code is not running.  This caused destroy-before-mission ships to be added to the arrival list when they shouldn't have been.

Also fix logic in `timestamp_elapsed_safe`, where the `TIMESTAMP` and `UI_TIMESTAMP` versions were correct, but the `int` version had a bug dating back to retail that caused it to return true for uninitialized (zero) timestamps rather than false.  Practically speaking, this fix has no effect because the function is only used in multiplayer and none of the instances use integer-0 to indicate uninitialized, but this will at least fix any uses in the future.
@Goober5000 Goober5000 added this to the Release 25.0 milestone Jan 21, 2026
@Goober5000 Goober5000 added fix A fix for bugs, not-a-bugs, and/or regressions. timer/timestamp Having to do with how time and timestamps are managed labels Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions. timer/timestamp Having to do with how time and timestamps are managed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant