From 5b28d5c5a107bb4b287c4eaab550b7f8a4b50bbd Mon Sep 17 00:00:00 2001
From: Quantum <quantum2048@gmail.com>
Date: Sat, 2 Nov 2013 15:13:05 -0400
Subject: [PATCH] Attempt at making diffuse and corona not intersect.

---
 punyverse/game.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/punyverse/game.py b/punyverse/game.py
index 2bc8929..5b6ecd5 100644
--- a/punyverse/game.py
+++ b/punyverse/game.py
@@ -328,10 +328,12 @@ class Applet(pyglet.window.Window):
                 glTranslatef(x0, y0, z0)
                 glRotatef(pitch, 1, 0, 0)
                 glRotatef(yaw, 0, 1, 0)
-                if has_corona:
-                    glCallList(entity.corona)
                 if has_atmosphere:
                     glCallList(entity.atmosphere)
+                if has_corona:
+                    x, y, z = c.direction()
+                    glTranslatef(-x, -y, -z)
+                    glCallList(entity.corona)
                 glPopMatrix()
 
             if self.cloud and hasattr(entity, "cloudmap") and entity.cloudmap: