fix Galactic Witchjump problem introduced with poor fuel-limit code

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

View File

@ -1721,15 +1721,19 @@ double scoopSoundPlayTime = 0.0;
}
// check max distance permitted
double jump_distance = distanceBetweenPlanetPositions(target_system_seed.d,target_system_seed.b,galaxy_coordinates.x,galaxy_coordinates.y);
if (jump_distance > 7.0)
double jump_distance = 0.0;
if (!galactic_witchjump)
{
[universe clearPreviousMessage];
[universe addMessage:[universe expandDescription:@"[witch-too-far]" forSystem:system_seed] forCount: 4.5];
if (![universe playCustomSound:@"[witch-too-far]"])
[witchAbortSound play];
status = STATUS_IN_FLIGHT;
go = NO;
jump_distance = distanceBetweenPlanetPositions(target_system_seed.d,target_system_seed.b,galaxy_coordinates.x,galaxy_coordinates.y);
if (jump_distance > 7.0)
{
[universe clearPreviousMessage];
[universe addMessage:[universe expandDescription:@"[witch-too-far]" forSystem:system_seed] forCount: 4.5];
if (![universe playCustomSound:@"[witch-too-far]"])
[witchAbortSound play];
status = STATUS_IN_FLIGHT;
go = NO;
}
}
// check fuel level