OoliteProject/oolite — pull request #106 by kanthoney (2014-08-06 17:23:22+00:00)
Title: NPC reaction times

This is an attempt to make the rection times of NPC's more human, as suggested in [this thread](http://aegidian.org/bb/viewtopic.php?f=2&t=16680). It works by recording the position of each NPC's primaryTarget a few times every second, then fitting a curve to the last few known positions and having the NPC follow the curve instead of reacting instantly to any change in the target's trajectory.

The standard reaction time is set in the constant COMBAT_AI_STANDARD_REACTION_TIME which is currently half a second - I'm not sure what the best value is, but it should be about the same time it takes a human to notice a change and react to it. You can set a per-ship reaction time using the ship.reactionTime Javascript property.