hard limit to jump distance 7.0LY
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@463 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
5ab0d9a295
commit
bdf0a407c1
@ -401,6 +401,10 @@
|
||||
<array>
|
||||
<string>Insufficient fuel for witchspace jump.</string>
|
||||
</array>
|
||||
<key>witch-too-far</key>
|
||||
<array>
|
||||
<string>Engines incapable of witchspace jump to that target.</string>
|
||||
</array>
|
||||
<key>witch-engine-malfunction</key>
|
||||
<array>
|
||||
<string>Witchspace engine malfunction!</string>
|
||||
|
@ -1719,9 +1719,21 @@ double scoopSoundPlayTime = 0.0;
|
||||
status = STATUS_IN_FLIGHT;
|
||||
go = NO;
|
||||
}
|
||||
|
||||
|
||||
// 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)
|
||||
{
|
||||
[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
|
||||
double fuel_required = 10.0 * distanceBetweenPlanetPositions(target_system_seed.d,target_system_seed.b,galaxy_coordinates.x,galaxy_coordinates.y);
|
||||
double fuel_required = 10.0 * jump_distance;
|
||||
if (galactic_witchjump)
|
||||
fuel_required = 0.0;
|
||||
if (fuel < fuel_required)
|
||||
|
Loading…
x
Reference in New Issue
Block a user