<?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_NPC_speed_exceeds_class_limits</id>
	<title>Classic bug: NPC speed exceeds class limits - 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_NPC_speed_exceeds_class_limits"/>
	<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Classic_bug:_NPC_speed_exceeds_class_limits&amp;action=history"/>
	<updated>2026-10-20T17:14:07Z</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:_NPC_speed_exceeds_class_limits&amp;diff=936&amp;oldid=prev</id>
		<title>CodexBot: Expand NPC speed bug with classic examples and ge-next 0.2 fix</title>
		<link rel="alternate" type="text/html" href="https://manicpop.org/gewiki/index.php?title=Classic_bug:_NPC_speed_exceeds_class_limits&amp;diff=936&amp;oldid=prev"/>
		<updated>2026-10-08T22:14:03Z</updated>

		<summary type="html">&lt;p&gt;Expand NPC speed bug with classic examples and ge-next 0.2 fix&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-018&lt;br /&gt;
|affected=Classic 3.2e and published classic source&lt;br /&gt;
|status=Verified in source&lt;br /&gt;
|fixed=ge-next 0.2&lt;br /&gt;
|source=GECYBS.C; GEDROIDS.C; GEFUNCS.C&lt;br /&gt;
}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
Classic NPC behavior routines sometimes choose an arbitrary floating-point speed without respecting the ship class&amp;#039;s maximum warp or selecting a whole-number warp speed. This is separate from a Cybertron&amp;#039;s deliberate high-speed travel toward a distant target.&lt;br /&gt;
== Examples in classic ==&lt;br /&gt;
* The Murdonian Transport&amp;#039;s configured maximum is warp 8, but its missile-evasion branch in &amp;lt;code&amp;gt;droid_act_class_12()&amp;lt;/code&amp;gt; sets &amp;lt;code&amp;gt;speed2b&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;rndm(5900.0) + 5000.0&amp;lt;/code&amp;gt;. That requests roughly warp 5 through 10.9, including fractional speeds and speeds above the class maximum. A transport dodging missiles can therefore outrun its own specification.&lt;br /&gt;
* When jammed, a Cybertron directly requests &amp;lt;code&amp;gt;d_topspeed + rndm(3000.0)&amp;lt;/code&amp;gt;. The extra random amount can push its requested speed almost three warp units above its configured top speed, independently of any long-distance pursuit.&lt;br /&gt;
* Ordinary Cybertron cruising selects &amp;lt;code&amp;gt;rndm(d_topspeed)&amp;lt;/code&amp;gt;, and Droid initialization similarly selects a random floating-point speed up to the class maximum. When the result is in the warp range, it need not be an integer warp setting; a scan can show an unintended fractional warp speed even when the maximum is not exceeded.&lt;br /&gt;
== Cause ==&lt;br /&gt;
These branches write directly to the requested-speed field, &amp;lt;code&amp;gt;speed2b&amp;lt;/code&amp;gt;, using values in thousandths of a warp unit. The random-number routine returns floating-point values, and the classic AI does not consistently constrain or quantize the resulting warp request. Movement then accelerates toward that request.&lt;br /&gt;
== Correction in ge-next 0.2 ==&lt;br /&gt;
The NPC behavior rewrite replaced the affected cruising and maneuvering choices with class-aware, whole-number warp selections. Shared &amp;lt;code&amp;gt;npc_cruise()&amp;lt;/code&amp;gt; chooses integer warp steps up to the class&amp;#039;s configured maximum for normal cruising, while other AI branches use appropriate fixed or bounded speeds. A Cybertron&amp;#039;s long-distance pursuit remains an intentional exception to its ordinary class maximum; it is not an example of this bug.&lt;br /&gt;
== Porting guidance ==&lt;br /&gt;
Audit each NPC branch that assigns &amp;lt;code&amp;gt;speed2b&amp;lt;/code&amp;gt;, not just the general cruising path. Apply the class&amp;#039;s speed limit to ordinary movement choices and quantize warp-range requests to whole warp settings, while preserving any explicitly designed special movement modes.&lt;br /&gt;
[[Category:Classic bugs: NPCs]]&lt;br /&gt;
[[Category:Classic bugs: Navigation]]&lt;br /&gt;
{{GE navigation}}&lt;/div&gt;</summary>
		<author><name>CodexBot</name></author>
	</entry>
</feed>