diff options
-rw-r--r-- | source/blender/blenkernel/intern/sca.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_navmesh.cpp | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_NavMeshObject.cpp | 14 |
4 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index e98d90ddc6e..257b34cb246 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -468,8 +468,10 @@ void init_actuator(bActuator *act) case ACT_STEERING: act->data = MEM_callocN(sizeof( bSteeringActuator), "steering act"); sta = act->data; - sta->acceleration = 3; - sta->turnspeed = 120; + sta->acceleration = 3.f; + sta->turnspeed = 120.f; + sta->dist = 1.f; + sta->velocity= 3.f; default: ; /* this is very severe... I cannot make any memory for this */ /* logic brick... */ diff --git a/source/blender/editors/object/object_navmesh.cpp b/source/blender/editors/object/object_navmesh.cpp index c357581ee3d..9b138365ac5 100644 --- a/source/blender/editors/object/object_navmesh.cpp +++ b/source/blender/editors/object/object_navmesh.cpp @@ -365,8 +365,8 @@ static Object* createRepresentation(bContext *C, rcPolyMesh*& pmesh, rcPolyMeshD else face[k] = uniquevbase+tri[k]-nv; //unique vertex } - newFace = addfacelist(em, EM_get_vert_for_index(face[0]), EM_get_vert_for_index(face[1]), - EM_get_vert_for_index(face[2]), NULL, NULL, NULL); + newFace = addfacelist(em, EM_get_vert_for_index(face[0]), EM_get_vert_for_index(face[2]), + EM_get_vert_for_index(face[1]), NULL, NULL, NULL); //set navigation polygon idx to the custom layer int* polygonIdx = (int*)CustomData_em_get(&em->fdata, newFace->data, CD_PROP_INT); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 3dc10530242..33dff40ae50 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1548,12 +1548,12 @@ static void rna_def_scene_game_recast_data(BlenderRNA *brna) prop= RNA_def_property(srna, "detailsampledist", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2); - RNA_def_property_ui_text(prop, "Sample Distance", "Detail mesh sample spacing"); + RNA_def_property_ui_text(prop, "Sample distance", "Detail mesh sample spacing"); RNA_def_property_update(prop, NC_SCENE, NULL); prop= RNA_def_property(srna, "detailsamplemaxerror", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2); - RNA_def_property_ui_text(prop, "Max Sample Error", "Detail mesh simplification max sample error"); + RNA_def_property_ui_text(prop, "Max sample error", "Detail mesh simplification max sample error"); RNA_def_property_update(prop, NC_SCENE, NULL); } @@ -1608,7 +1608,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) static EnumPropertyItem obstacle_simulation_items[] = { {OBSTSIMULATION_NONE, "NONE", 0, "None", ""}, - {OBSTSIMULATION_TOI, "TOI", 0, "TOI", ""}, + {OBSTSIMULATION_TOI, "RVO", 0, "RVO", ""}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "SceneGameData", NULL); diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.cpp b/source/gameengine/Ketsji/KX_NavMeshObject.cpp index 63d84d0c028..617d556785a 100644 --- a/source/gameengine/Ketsji/KX_NavMeshObject.cpp +++ b/source/gameengine/Ketsji/KX_NavMeshObject.cpp @@ -147,7 +147,7 @@ bool KX_NavMeshObject::BuildVertIndArrays(RAS_MeshObject* meshobj, float *&verti return true; } - //build detailed mesh adjacency + //build detailed mesh adjacency (with triangle reordering) ndtris = numfaces; dtris = new unsigned short[numfaces*3*2]; memset(dtris, 0xffff, sizeof(unsigned short)*3*2*numfaces); @@ -155,8 +155,8 @@ bool KX_NavMeshObject::BuildVertIndArrays(RAS_MeshObject* meshobj, float *&verti { MFace* mf = &mface[i]; dtris[i*3*2+0] = mf->v1; - dtris[i*3*2+1] = mf->v2; - dtris[i*3*2+2] = mf->v3; + dtris[i*3*2+1] = mf->v3; + dtris[i*3*2+2] = mf->v2; } buildMeshAdjacency(dtris, numfaces, numverts, 3); @@ -477,14 +477,6 @@ bool KX_NavMeshObject::BuildNavMesh() flipAxes(&dvertices[i*3]); } -/* - //reorder tris - for (int i=0; i<npolys; i++) - { - std::swap(polys[6*i+1], polys[6*i+2]); - } -*/ - buildMeshAdjacency(polys, npolys, nverts, vertsPerPoly); float cs = 0.2f; |