[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20961] trunk/blender/source/gameengine/ BlenderRoutines/KX_BlenderRenderTools.cpp: Fix for bug: [#18619] Shadow face flag ignores object's scale

Dalai Felinto dfelinto at gmail.com
Wed Jun 17 23:18:32 CEST 2009


Revision: 20961
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20961
Author:   dfelinto
Date:     2009-06-17 23:18:32 +0200 (Wed, 17 Jun 2009)

Log Message:
-----------
Fix for bug: [#18619] Shadow face flag ignores object's scale
In time for the 2.49a ahoy :)

Modified Paths:
--------------
    trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp

Modified: trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp	2009-06-17 20:33:34 UTC (rev 20960)
+++ trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp	2009-06-17 21:18:32 UTC (rev 20961)
@@ -261,6 +261,12 @@
 				// couldn't find something to cast the shadow on...
 				glMultMatrixd(oglmatrix);
 			}
+			else
+			{ // we found the "ground", but the cast matrix doesn't take
+			  // scaling in consideration, so we must apply the object scale
+				MT_Vector3  size = gameobj->GetSGNode()->GetLocalScale();
+				glScalef(size[0], size[1], size[2]);
+			}
 		} else
 		{
 
@@ -384,5 +390,4 @@
 void KX_BlenderRenderTools::Render2DFilters(RAS_ICanvas* canvas)
 {
 	m_filtermanager.RenderFilters(canvas);
-}
-
+}
\ No newline at end of file





More information about the Bf-blender-cvs mailing list