mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 04:31:34 -10:00
The ai-fly-to-ship goal was added early in FSO's development but never worked right. Until recently it could crash; and even aside from the crash the AI would try to reach the target's exact position, causing repeated collisions. This folds ai-fly-to-ship into ai-stay-near-ship, since the behaviors are conceptually the same except for fly-to being satisfied as soon as the target is in range. This also adds a new "escort" mode usable by both behaviors. The default Volition behavior is to swoop toward the target in a long, graceful arc; the new mode generates a goal point and flies directly to that point. These can be toggled via an optional sexp parameter. There is also some minor cleanup and a new vec3d operator for convenience. Needed for Scroll; depends on #5667.