Giles is dumb and can't tell MIN from MAX!

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@503 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Giles Williams 2006-04-28 10:41:26 +00:00
parent e30946833b
commit 3b4197fa70

View File

@ -2425,7 +2425,7 @@ BOOL ship_canCollide (ShipEntity* ship)
double distance = [self rangeToDestination];
if (range < slow_down_range)
{
desired_speed = MIN(target_speed, 0.25 * max_flight_speed);
desired_speed = MAX(target_speed, 0.25 * max_flight_speed);
// avoid head-on collision
//
if ((range < 0.5 * distance)&&(behaviour == BEHAVIOUR_ATTACK_FLY_TO_TARGET_SIX))
@ -2441,7 +2441,7 @@ BOOL ship_canCollide (ShipEntity* ship)
{
behaviour = BEHAVIOUR_ATTACK_FLY_TO_TARGET;
frustration = 0.0;
desired_speed = MIN(target_speed, 0.25 * max_flight_speed); // within the weapon's range don't use afterburner
desired_speed = MAX(target_speed, 0.25 * max_flight_speed); // within the weapon's range don't use afterburner
}
// target-six
@ -2558,7 +2558,7 @@ BOOL ship_canCollide (ShipEntity* ship)
ShipEntity* target = (ShipEntity*)[universe entityForUniversalID:primaryTarget];
double target_speed = [target getVelocityAsSpeed];
if (range <= slow_down_range)
desired_speed = MIN(target_speed, 0.25 * max_flight_speed); // within the weapon's range match speed
desired_speed = MAX(target_speed, 0.25 * max_flight_speed); // within the weapon's range match speed
else
desired_speed = max_available_speed; // use afterburner to approach