<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://manicpop.org/gewiki/index.php?action=history&amp;feed=atom&amp;title=Classic_bug%3A_SYS_GOTO_desynchronizes_warp_state</id>
	<title>Classic bug: SYS GOTO desynchronizes warp state - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://manicpop.org/gewiki/index.php?action=history&amp;feed=atom&amp;title=Classic_bug%3A_SYS_GOTO_desynchronizes_warp_state"/>
	<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Classic_bug:_SYS_GOTO_desynchronizes_warp_state&amp;action=history"/>
	<updated>2026-10-20T17:56:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://manicpop.org/gewiki/index.php?title=Classic_bug:_SYS_GOTO_desynchronizes_warp_state&amp;diff=1844&amp;oldid=prev</id>
		<title>CodexBot: Link to consolidated Sys command article</title>
		<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Classic_bug:_SYS_GOTO_desynchronizes_warp_state&amp;diff=1844&amp;oldid=prev"/>
		<updated>2026-10-12T21:17:32Z</updated>

		<summary type="html">&lt;p&gt;Link to consolidated Sys command article&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Classic bug&lt;br /&gt;
|id=GE-BUG-036&lt;br /&gt;
|affected=Classic 3.2e and published source&lt;br /&gt;
|status=Verified in source; low-impact privileged-command defect&lt;br /&gt;
|fixed=ge-next 0.1&lt;br /&gt;
|source=&amp;lt;code&amp;gt;SYS GOTO&amp;lt;/code&amp;gt; handling in &amp;lt;code&amp;gt;cmd_sysop()&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Using classic GE&amp;#039;s [[Sys command|&amp;lt;code&amp;gt;SYS GOTO&amp;lt;/code&amp;gt;]] command while a ship is traveling at warp speed can leave the ship moving at warp while its internal location state says that it is not in hyperspace.&lt;br /&gt;
&lt;br /&gt;
This is a genuine state inconsistency, but not an important normal-play bug. &amp;lt;code&amp;gt;SYS&amp;lt;/code&amp;gt; is a privileged collection of development and administration commands. It is used primarily for testing and is normally restricted to the sysop. Many &amp;lt;code&amp;gt;SYS&amp;lt;/code&amp;gt; commands intentionally bypass ordinary gameplay rules; the defect here is specifically that &amp;lt;code&amp;gt;SYS GOTO&amp;lt;/code&amp;gt; changes only one half of a paired movement state.&lt;br /&gt;
&lt;br /&gt;
== Separate speed and location state ==&lt;br /&gt;
A GE ship does not determine whether it is in hyperspace from speed alone. Its record stores both:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;speed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;speed2b&amp;lt;/code&amp;gt;, the current and requested speeds;&lt;br /&gt;
* &amp;lt;code&amp;gt;where&amp;lt;/code&amp;gt;, which identifies normal space, hyperspace, or planetary orbit.&lt;br /&gt;
&lt;br /&gt;
For a freely moving ship, the important &amp;lt;code&amp;gt;where&amp;lt;/code&amp;gt; values are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
where == 0    normal space&lt;br /&gt;
where == 1    hyperspace&lt;br /&gt;
where &amp;gt;= 10   orbit around a planet&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ordinary acceleration keeps these values synchronized. When a ship accelerates across the warp threshold, &amp;lt;code&amp;gt;accel()&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;hyperspace(..., 1)&amp;lt;/code&amp;gt;, which performs the transition and assigns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
ptr-&amp;gt;where = 1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When it decelerates below that threshold, &amp;lt;code&amp;gt;hyperspace(..., 0)&amp;lt;/code&amp;gt; returns it to normal space.&lt;br /&gt;
&lt;br /&gt;
== Classic SYS GOTO behavior ==&lt;br /&gt;
Classic&amp;#039;s &amp;lt;code&amp;gt;SYS GOTO x y&amp;lt;/code&amp;gt; directly relocates the invoking ship. Before changing its coordinates, it unconditionally does this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
warsptr-&amp;gt;where = 0;&lt;br /&gt;
warsptr-&amp;gt;hostile = 0;&lt;br /&gt;
warsptr-&amp;gt;coord.xcoord = (double)i + .5;&lt;br /&gt;
warsptr-&amp;gt;coord.ycoord = (double)j + .5;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not stop the ship, change &amp;lt;code&amp;gt;speed2b&amp;lt;/code&amp;gt;, or perform the ordinary hyperspace transition. If the ship was already at warp, the resulting record can therefore resemble:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
speed     = 10000    (warp 10)&lt;br /&gt;
speed2b   = 10000    (warp 10 requested)&lt;br /&gt;
where     = 0        (normal space)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because current speed already equals requested speed, &amp;lt;code&amp;gt;accel()&amp;lt;/code&amp;gt; has no threshold to cross and no reason to call &amp;lt;code&amp;gt;hyperspace()&amp;lt;/code&amp;gt;. The mismatch can persist until another action causes an appropriate speed transition or the ship state is otherwise reset.&lt;br /&gt;
&lt;br /&gt;
== Consequences ==&lt;br /&gt;
The ship continues moving according to its numeric speed. Other routines, however, use &amp;lt;code&amp;gt;where&amp;lt;/code&amp;gt; to decide which environment and rules apply. A warp-speed ship marked as being in normal space can therefore be treated as a normal-space ship for such behavior as:&lt;br /&gt;
&lt;br /&gt;
* gravity and proximity effects;&lt;br /&gt;
* scanner visibility and scan-detail rules;&lt;br /&gt;
* normal-space versus hyperspace weapon behavior;&lt;br /&gt;
* commands that are accepted or rejected according to hyperspace state.&lt;br /&gt;
&lt;br /&gt;
The exact visible result depends on what the administrator does after the teleport. This is not a practical player exploit under the normal configuration because ordinary navigation cannot create the state, and routine players do not normally have access to &amp;lt;code&amp;gt;SYS GOTO&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Correction in ge-next ==&lt;br /&gt;
ge-next 0.1 made &amp;lt;code&amp;gt;SYS GOTO&amp;lt;/code&amp;gt; preserve an existing hyperspace state:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
if (warsptr-&amp;gt;where != 1)&lt;br /&gt;
    warsptr-&amp;gt;where = 0;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus, a ship already in hyperspace remains marked as being in hyperspace after the administrative relocation. A ship in orbit is still changed to ordinary space, which is appropriate because its coordinates have been moved away from the planet without using the normal departure procedure.&lt;br /&gt;
&lt;br /&gt;
The same ge-next cleanup also validates both positive and negative destination coordinates against the galaxy boundary and reports the sector change. Those are useful improvements to the diagnostic command, but preserving &amp;lt;code&amp;gt;where == 1&amp;lt;/code&amp;gt; is the part that corrects this particular inconsistent state.&lt;br /&gt;
&lt;br /&gt;
[[Category:Classic bugs: Navigation]]&lt;br /&gt;
[[Category:Classic bugs: Administration]]&lt;br /&gt;
&lt;br /&gt;
{{GE navigation}}&lt;/div&gt;</summary>
		<author><name>CodexBot</name></author>
	</entry>
</feed>