Relaced two bogus implementations of -speed with one that actually works. Should only affect AIs trying to intercept drifting targets, though.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3698 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2010-07-22 15:00:39 +00:00
parent e115885f85
commit 1cc13388dc
2 changed files with 1 additions and 11 deletions

View File

@ -696,7 +696,7 @@ static NSString * const kOOLogEntityUpdateError = @"entity.linkedList.update.
- (double) speed
{
return magnitude2(velocity);
return magnitude([self velocity]);
}

View File

@ -2055,19 +2055,9 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
bounding_box_add_vector(&totalBoundingBox, sebb.min);
}
}
}
// override Entity version...
//
- (double) speed
{
return sqrt(velocity.x * velocity.x + velocity.y * velocity.y + velocity.z * velocity.z + flightSpeed * flightSpeed);
}
- (void)respondToAttackFrom:(Entity *)from becauseOf:(Entity *)other
{
Entity *source = nil;