diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-06-05 03:24:23 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-06-05 03:24:23 +0300 |
commit | f3434e5f827c651be10fdc4be2a008ac790980ea (patch) | |
tree | e23e87c5df62609c99fd582edc1e6bca058dce40 | |
parent | 2cbe60b47672acd67b6ec2c15f13f196247ecfe3 (diff) |
BGE Cleanup: remove dead code for collide, visible and twoside variables
As material is not NULL at this stage there is no need to do a NULL
check. Also to remove dead code
Reviewers: dfelinto, panzergame, hg1, moguri
Reviewed By: panzergame, hg1, moguri
Projects: #game_engine
Differential Revision: https://developer.blender.org/D1330
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 3fc0215fe18..3da0863508b 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -995,7 +995,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene, meshobj->m_sharedvertex_map.resize(totvert); Material* ma = 0; - bool collider = true; MT_Point2 uvs[4][RAS_TexVert::MAX_UNIT]; unsigned int rgb[4] = {0}; @@ -1071,23 +1070,13 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene, } { - bool visible = true; - bool twoside = false; RAS_MaterialBucket* bucket = material_from_mesh(ma, mface, tface, mcol, layers, lightlayer, rgb, uvs, tfaceName, scene, converter); // set render flags - if (ma) - { - visible = ((ma->game.flag & GEMAT_INVISIBLE)==0); - twoside = ((ma->game.flag & GEMAT_BACKCULL)==0); - collider = ((ma->game.flag & GEMAT_NOPHYSICS)==0); - } - else { - visible = true; - twoside = false; - collider = true; - } + bool visible = ((ma->game.flag & GEMAT_INVISIBLE)==0); + bool twoside = ((ma->game.flag & GEMAT_BACKCULL)==0); + bool collider = ((ma->game.flag & GEMAT_NOPHYSICS)==0); /* mark face as flat, so vertices are split */ bool flat = (mface->flag & ME_SMOOTH) == 0; |