diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_ObstacleSimulation.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_ObstacleSimulation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp index a942f87856c..99d9fc7f9ee 100644 --- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp +++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp @@ -257,7 +257,7 @@ void KX_ObstacleSimulation::AddObstacleForObj(KX_GameObject* gameobj) } void KX_ObstacleSimulation::AddObstaclesForNavMesh(KX_NavMeshObject* navmeshobj) -{ +{ dtStatNavMesh* navmesh = navmeshobj->GetNavMesh(); if (navmesh) { @@ -267,7 +267,7 @@ void KX_ObstacleSimulation::AddObstaclesForNavMesh(KX_NavMeshObject* navmeshobj) const dtStatPoly* poly = navmesh->getPoly(pi); for (int i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j = i++) - { + { if (poly->n[j]) continue; const float* vj = navmesh->getVertex(poly->v[j]); const float* vi = navmesh->getVertex(poly->v[i]); @@ -364,9 +364,9 @@ void KX_ObstacleSimulation::DrawObstacles() else if (m_obstacles[i]->m_shape==KX_OBSTACLE_CIRCLE) { KX_RasterizerDrawDebugCircle(m_obstacles[i]->m_pos, m_obstacles[i]->m_rad, bluecolor, - normal, SECTORS_NUM); + normal, SECTORS_NUM); } - } + } } static MT_Point3 nearestPointToObstacle(MT_Point3& pos ,KX_Obstacle* obstacle) @@ -424,7 +424,7 @@ KX_ObstacleSimulationTOI::KX_ObstacleSimulationTOI(MT_Scalar levelHeight, bool e void KX_ObstacleSimulationTOI::AdjustObstacleVelocity(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj, - MT_Vector3& velocity, MT_Scalar maxDeltaSpeed, MT_Scalar maxDeltaAngle) + MT_Vector3& velocity, MT_Scalar maxDeltaSpeed, MT_Scalar maxDeltaAngle) { int nobs = m_obstacles.size(); int obstidx = std::find(m_obstacles.begin(), m_obstacles.end(), activeObst) - m_obstacles.begin(); @@ -446,7 +446,7 @@ void KX_ObstacleSimulationTOI::AdjustObstacleVelocity(KX_Obstacle* activeObst, K vadd(vel, activeObst->vel, dv); velocity.x() = vel[0]; - velocity.y() = vel[1]; + velocity.y() = vel[1]; } ///////////*********TOI_rays**********///////////////// @@ -642,7 +642,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM for (int n = 0; n < nspos; ++n) { float vcand[2]; - vcpy(vcand, &spos[n*2]); + vcpy(vcand, &spos[n*2]); // Find min time of impact and exit amongst all obstacles. float tmin = maxToi; |