Blender Internal: Add material property "Cast" which can disable both ray and buffer...
[blender.git] / source / gameengine / Converter / BL_BlenderDataConversion.cpp
index b5c9f7a9abe10b03f2868a643b07ac49203d56f5..3501addc00fec591cf95983cff4210a839a4c1d7 100644 (file)
@@ -612,7 +612,7 @@ static bool ConvertMaterial(
                material->ras_mode |= ( mat->game.flag & GEMAT_BACKCULL )?0:TWOSIDED;
 
                // cast shadows?
-               material->ras_mode |= ( mat->mode & MA_SHADBUF )?CAST_SHADOW:0;
+               material->ras_mode |= ( (mat->mode2 & MA_CASTSHADOW) && (mat->mode & MA_SHADBUF) )?CAST_SHADOW:0;
 
                // only shadows?
                material->ras_mode |= ( mat->mode & MA_ONLYCAST )?ONLY_SHADOW:0;