- align atmosphere rotation mostly to planetary rotation

- reduce default planet rotation speed range to ~1-2 hours / revolution
- give CLASS_STATION the same protection as CLASS_THARGOID from accidental bounties


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5510 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Chris Morris 2012-11-17 13:36:31 +00:00
parent 3884ca13ef
commit f574fbc350
2 changed files with 7 additions and 7 deletions

View File

@ -346,7 +346,7 @@ static const BaseFace kTexturedFaces[][3] =
[self scaleVertices];
// set speed of rotation
rotational_velocity = [dict oo_floatForKey:@"atmosphere_rotational_velocity" defaultValue:0.01f + 0.02f * randf()]; // 0.01 .. 0.03 avr 0.02
rotational_velocity = [dict oo_floatForKey:@"atmosphere_rotational_velocity" defaultValue:[planet rotationalVelocity]*(0.9+(randf()*0.2))]; // 90-110% of planet rotation speed
root_planet = planet;
@ -545,7 +545,7 @@ static const BaseFace kTexturedFaces[][3] =
}
else
{
rotational_velocity = [planetInfo oo_floatForKey:@"rotation_speed" defaultValue:0.005 * randf()]; // 0.0 .. 0.005 avr 0.0025
rotational_velocity = [planetInfo oo_floatForKey:@"rotation_speed" defaultValue:0.002 * (0.5+0.5*randf())]; // 0.001 .. 0.002 avr 0.0015
rotational_velocity *= [planetInfo oo_floatForKey:@"rotation_speed_factor" defaultValue:1.0f];
}
@ -962,7 +962,7 @@ static const BaseFace kTexturedFaces[][3] =
OOGL(glPushMatrix()); // and store it again
OOGL(glTranslatef(position.x,position.y,position.z)); // centre on the planet
// rotate
GLMultOOMatrix([atmosphere rotationMatrix]);
// GLMultOOMatrix([atmosphere rotationMatrix]);
// draw atmosphere entity
[atmosphere drawImmediate:false translucent:false];
}

View File

@ -7066,9 +7066,9 @@ NSComparisonResult ComparePlanetsBySurfaceDistance(id i1, id i2, void* context)
}
else
{
if (scanClass == CLASS_THARGOID && reason != kOOLegalStatusReasonSetup && reason != kOOLegalStatusReasonByScript)
if ((scanClass == CLASS_THARGOID || scanClass == CLASS_STATION) && reason != kOOLegalStatusReasonSetup && reason != kOOLegalStatusReasonByScript)
{
return; // we ignore your puny human laws
return; // no standard bounties for Thargoids / Stations
}
if (scanClass == CLASS_POLICE && amount != 0)
{
@ -11724,9 +11724,9 @@ Vector positionOffsetForShipInRotationToAlignment(ShipEntity* ship, Quaternion q
}
else
{
if (scanClass == CLASS_THARGOID && reason != kOOLegalStatusReasonSetup && reason != kOOLegalStatusReasonByScript)
if ((scanClass == CLASS_THARGOID || scanClass == CLASS_STATION) && reason != kOOLegalStatusReasonSetup && reason != kOOLegalStatusReasonByScript)
{
return; // we ignore your puny human laws
return; // no non-scripted bounties for thargoids and stations
}
JSContext *context = OOJSAcquireContext();