Classic bug: Self-destruct abort omits count-10 all-clear
| Bug ID | GE-BUG-053 |
|---|---|
| Affected versions | Classic Galactic Empire 3.2e and ge-next through 0.3.2 |
| Status | Verified in source |
| Fixed in | ge-next 0.3.3 |
| Primary source | cmd_abort() in GECMDS.C; destruct() in GEFUNCS.C
|
Summary
A self-destruct countdown warns nearby players when it reaches 10 ship-state updates remaining. If the initiating player enters ABORT while the stored count is exactly 10, the countdown stops but those players receive no all-clear. Aborting one update later, at 9, does send the all-clear. This is an off-by-one notification gap, not a failure to cancel the destruction.
Symptoms and reproduction
- Start
DESTRUCToutside the neutral zone while another player is within detection range. - Wait for the count-10 neutron-flux warning to reach that player.
- Enter
ABORTbefore the next ship-state update reduces the count to 9. - The initiating player receives confirmation that self-destruct was aborted. Nearby players receive no resolution message, despite having just received the count-10 warning.
Repeating the test with ABORT at count 9 sends the resolution message. The count remains at each value for roughly one six-second ship-state interval, so the count-10 window is short.
Cause
The tick routine in GEFUNCS.C decrements the countdown and broadcasts the first warning when the resulting value is exactly 10. The abort command in GECMDS.C broadcasts an all-clear only when that value is less than 10:
if (warsptr->destruct < 10) {
prfmsg(SELFD4A, warsptr->shipname);
outrange(ALWAYS, &warsptr->coord);
}
A normal DESTRUCT starts at 20; reaching 10 through the regular update sends the warning before the abort command can see that value. The strict comparison therefore excludes exactly the first warned state. Elwynor's 32-bit classic port carries the same comparison. ge-next inherited it through 0.3.2.
Correction in ge-next
ge-next 0.3.3 changes the abort condition to destruct <= 10 in both 16-bit and 32-bit code. This includes the first warned state without changing countdown timing, explosion behavior, or the player's ability to abort. A classic-compatible port can apply the same comparison change.
The fix matches the countdown state, not individual recipients. Warnings and all-clears are sent to ships within detection range at their respective times. A ship that enters range after the warning can still receive an all-clear without having heard the warning; conversely, a ship that leaves range may miss the all-clear. This existing limitation is separate from the count-10 off-by-one error.
See also
Home · Play · Reference · Versions & history · Sysop · Development · Classic bugs