Fix T39053: Replace mesh actuator does not replace material (only mesh)
authorMitchell Stokes <mogurijin@gmail.com>
Tue, 3 Jun 2014 01:52:13 +0000 (18:52 -0700)
committerMitchell Stokes <mogurijin@gmail.com>
Tue, 3 Jun 2014 01:52:13 +0000 (18:52 -0700)
The replace mesh actuator was reconverting the mesh data which causes
conflicts with the LoD code. Instead, we just look for an already
converted mesh, which should already be in the scene.

source/gameengine/Converter/KX_ConvertActuators.cpp

index b59c26ab90baa962c92d7bbdbeac0d5884a0d3a4..7d5527d4cbba826fa044ee4ecf22721e6df0171f 100644 (file)
@@ -514,15 +514,7 @@ void BL_ConvertActuators(const char* maggiename,
                                        break;
                                case ACT_EDOB_REPLACE_MESH:
                                        {
-                                               RAS_MeshObject *tmpmesh = NULL;
-                                               if (editobact->me)
-                                                       tmpmesh = BL_ConvertMesh(
-                                                                   editobact->me,
-                                                                   blenderobject,
-                                                                   scene,
-                                                                   converter,
-                                                                   false
-                                                                   );
+                                               RAS_MeshObject *tmpmesh = converter->FindGameMesh(editobact->me);
 
                                                KX_SCA_ReplaceMeshActuator* tmpreplaceact = new KX_SCA_ReplaceMeshActuator(
                                                            gameobj,