From: Rudolf Polzer Date: Fri, 30 Jul 2010 14:02:23 +0000 (+0200) Subject: turn lights by 45 degrees to make them look the same in all 3 2D views X-Git-Tag: xonotic-v0.5.0~244 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=49908637c3195531c4850dbbf2368a41f21a90b4;ds=sidebyside turn lights by 45 degrees to make them look the same in all 3 2D views --- diff --git a/plugins/entity/light.cpp b/plugins/entity/light.cpp index 667b38b7..0d2a4ad9 100644 --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@ -255,13 +255,13 @@ void light_vertices(const AABB& aabb_light, Vector3 points[6]) Vector3 min(vector3_subtracted(aabb_light.origin, aabb_light.extents)); Vector3 mid(aabb_light.origin); - // top, bottom, tleft, tright, bright, bleft + // top, bottom, middle-up, middle-right, middle-down, middle-left points[0] = Vector3(mid[0], mid[1], max[2]); points[1] = Vector3(mid[0], mid[1], min[2]); - points[2] = Vector3(min[0], max[1], mid[2]); - points[3] = Vector3(max[0], max[1], mid[2]); - points[4] = Vector3(max[0], min[1], mid[2]); - points[5] = Vector3(min[0], min[1], mid[2]); + points[2] = Vector3(mid[0], max[1], mid[2]); + points[3] = Vector3(max[0], mid[1], mid[2]); + points[4] = Vector3(mid[0], min[1], mid[2]); + points[5] = Vector3(min[0], mid[1], mid[2]); } void light_draw(const AABB& aabb_light, RenderStateFlags state)