From 84dd448b65d7ebbbc884a096a5d9da6ca2663561 Mon Sep 17 00:00:00 2001 From: cim Date: Sun, 7 Jul 2013 16:17:16 +0100 Subject: [PATCH] Fix potential overheating bug when leaving planet for sun --- src/Core/Entities/PlanetEntity.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Core/Entities/PlanetEntity.m b/src/Core/Entities/PlanetEntity.m index 499e435a..64e38bb0 100644 --- a/src/Core/Entities/PlanetEntity.m +++ b/src/Core/Entities/PlanetEntity.m @@ -685,6 +685,18 @@ static const BaseFace kTexturedFaces[][3] = blue:0.9 * aleph alpha:aleph]; } + else if (alt > 0 && alt <= atmo * 1.5) + { + /* Without this, if you leave the atmosphere at very low + * frame rates, you might still have skyalpha > 0 when you + * go sun-skimming. Since skyalpha > 0 simulates atmospheric + * friction and continually pumps heat into the ship, this + * is rapidly fatal - CIM */ + [UNIVERSE setSkyColorRed:0.0f + green:0.0f + blue:0.0f + alpha:0.0f]; + } } case STELLAR_TYPE_MOON: {