From ce8dfe954a144ddcb1700700eeb805769697f2fa Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 1 Apr 2010 02:39:24 +0000 Subject: [PATCH] (Hopefully) fixed compilation on non-VS compilers. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5110 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/controller/default_ai_controller.cpp | 10 +++++----- src/karts/controller/default_ai_controller.hpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/karts/controller/default_ai_controller.cpp b/src/karts/controller/default_ai_controller.cpp index 449c66eba..350144ad3 100644 --- a/src/karts/controller/default_ai_controller.cpp +++ b/src/karts/controller/default_ai_controller.cpp @@ -779,7 +779,7 @@ void DefaultAIController::handleNitroAndZipper() } // handleNitroAndZipper //----------------------------------------------------------------------------- -void DefaultAIController::checkCrashes( const int STEPS, const Vec3& pos ) +void DefaultAIController::checkCrashes(int steps, const Vec3& pos ) { //Right now there are 2 kind of 'crashes': with other karts and another //with the track. The sight line is used to find if the karts crash with @@ -802,13 +802,13 @@ void DefaultAIController::checkCrashes( const int STEPS, const Vec3& pos ) vel_normal/=speed; int current_node = m_track_node; - if(STEPS<1 || STEPS>1000) + if(steps<1 || steps>1000) { printf("Warning, incorrect STEPS=%d. kart_length %f velocity %f\n", - STEPS, m_kart_length, m_kart->getVelocityLC().getZ()); - STEPS=1000; + steps, m_kart_length, m_kart->getVelocityLC().getZ()); + steps=1000; } - for(int i = 1; STEPS > i; ++i) + for(int i = 1; steps > i; ++i) { Vec3 step_coord = pos + vel_normal* m_kart_length * float(i); diff --git a/src/karts/controller/default_ai_controller.hpp b/src/karts/controller/default_ai_controller.hpp index d4ff42e2a..54a6e636e 100644 --- a/src/karts/controller/default_ai_controller.hpp +++ b/src/karts/controller/default_ai_controller.hpp @@ -167,7 +167,7 @@ private: void handleNitroAndZipper(); void computeNearestKarts(); - void checkCrashes(const int STEPS, const Vec3& pos); + void checkCrashes(int steps, const Vec3& pos); void findNonCrashingPoint(Vec3 *result); int calcSteps();