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:
parent
e115885f85
commit
1cc13388dc
@ -696,7 +696,7 @@ static NSString * const kOOLogEntityUpdateError = @"entity.linkedList.update.
|
||||
|
||||
- (double) speed
|
||||
{
|
||||
return magnitude2(velocity);
|
||||
return magnitude([self velocity]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user