clear some warnings.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 9 Oct 2011 04:11:18 +0000 (04:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 9 Oct 2011 04:11:18 +0000 (04:11 +0000)
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
source/gameengine/Ketsji/KX_SteeringActuator.cpp
source/gameengine/Ketsji/KX_SteeringActuator.h

index 853b36b54f723bf8491d9f1fb80725baf9401472..e5e9c3330e5e44c7ce75148e06a3bb42d01de1eb 100644 (file)
@@ -110,9 +110,9 @@ KX_GameObject::KX_GameObject(
       m_pGraphicController(NULL),
       m_xray(false),
       m_pHitObject(NULL),
+      m_pObstacleSimulation(NULL),
       m_actionManager(NULL),
-      m_isDeformable(false),
-      m_pObstacleSimulation(NULL)
+      m_isDeformable(false)
 #ifdef WITH_PYTHON
     , m_attr_dict(NULL)
 #endif
index 5f78d9a372260a64f59efc4eee593d50411e8543..c2b53fb71ba28971760a69888869b613776cf7d2 100644 (file)
@@ -633,7 +633,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
 
        const float ivmax = 1.0f / vmax;
 
-       float adir[2], adist;
+       float adir[2] /*, adist */;
        vcpy(adir, activeObst->pvel);
        if (vlen(adir) > 0.01f)
                vnorm(adir);
@@ -641,7 +641,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
                vset(adir,0,0);
        float activeObstPos[2];
        vset(activeObstPos, activeObst->m_pos.x(), activeObst->m_pos.y()); 
-       adist = vdot(adir, activeObstPos);
+       /* adist = vdot(adir, activeObstPos); */
 
        float minPenalty = FLT_MAX;
 
index 1edecdf44d26f98f3a7c3474d1786a900c066d75..f998da18f83d3f910a5c0c1f712df2c7337caa7b 100644 (file)
 /* ------------------------------------------------------------------------- */
 
 KX_SteeringActuator::KX_SteeringActuator(SCA_IObject *gameobj, 
-                                                                       int mode,
-                                                                       KX_GameObject *target,
-                                                                       KX_GameObject *navmesh,
-                                                                       float distance,
-                                                                       float velocity, 
-                                                                       float acceleration,                                                                     
-                                                                       float turnspeed,
-                                                                       bool  isSelfTerminated,
-                                                                       int pathUpdatePeriod,
-                                                                       KX_ObstacleSimulation* simulation,
-                                                                       short facingmode,
-                                                                       bool normalup,
-                                                                       bool enableVisualization)        : 
-       SCA_IActuator(gameobj, KX_ACT_STEERING),
-       m_mode(mode),
-       m_target(target),
-       m_distance(distance),
-       m_velocity(velocity),
-       m_acceleration(acceleration),
-       m_turnspeed(turnspeed),
-       m_isSelfTerminated(isSelfTerminated),
-       m_pathUpdatePeriod(pathUpdatePeriod),
-       m_updateTime(0),
-       m_isActive(false),      
-       m_simulation(simulation),       
-       m_enableVisualization(enableVisualization),
-       m_facingMode(facingmode),
-       m_normalUp(normalup),
-       m_obstacle(NULL),
-       m_pathLen(0),
-       m_wayPointIdx(-1),
-       m_steerVec(MT_Vector3(0, 0, 0))
+                                         int mode,
+                                         KX_GameObject *target,
+                                         KX_GameObject *navmesh,
+                                         float distance,
+                                         float velocity,
+                                         float acceleration,
+                                         float turnspeed,
+                                         bool  isSelfTerminated,
+                                         int pathUpdatePeriod,
+                                         KX_ObstacleSimulation* simulation,
+                                         short facingmode,
+                                         bool normalup,
+                                         bool enableVisualization)
+    : SCA_IActuator(gameobj, KX_ACT_STEERING),
+      m_target(target),
+      m_mode(mode),
+      m_distance(distance),
+      m_velocity(velocity),
+      m_acceleration(acceleration),
+      m_turnspeed(turnspeed),
+      m_simulation(simulation),
+      m_updateTime(0),
+      m_obstacle(NULL),
+      m_isActive(false),
+      m_isSelfTerminated(isSelfTerminated),
+      m_enableVisualization(enableVisualization),
+      m_facingMode(facingmode),
+      m_normalUp(normalup),
+      m_pathLen(0),
+      m_pathUpdatePeriod(pathUpdatePeriod),
+      m_wayPointIdx(-1),
+      m_steerVec(MT_Vector3(0, 0, 0))
 {
        m_navmesh = static_cast<KX_NavMeshObject*>(navmesh);
        if (m_navmesh)
index 4f8303107f7e6ac2013f76ad6e770cacece309b6..d337799976b4b9ff30a24c843010c4eb3f0d286d 100644 (file)
@@ -56,12 +56,12 @@ class KX_SteeringActuator : public SCA_IActuator
        int     m_mode;
        float m_distance;
        float m_velocity;
-       float m_acceleration;                                                                   
+       float m_acceleration;
        float m_turnspeed;
        KX_ObstacleSimulation* m_simulation;
        
-       KX_Obstacle* m_obstacle;
        double m_updateTime;
+       KX_Obstacle* m_obstacle;
        bool m_isActive;
        bool m_isSelfTerminated;
        bool m_enableVisualization;