From 7e2b9abc6ee61d079126d7817adcf1ffab2380a4 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 27 Aug 2012 23:05:44 +0000 Subject: [PATCH] Fixed release mode compilation and removed some compiler warnings. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11524 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/controller/skidding_ai.cpp | 2 +- src/karts/controller/skidding_ai.hpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/karts/controller/skidding_ai.cpp b/src/karts/controller/skidding_ai.cpp index d33a8a0f1..7f43e701f 100644 --- a/src/karts/controller/skidding_ai.cpp +++ b/src/karts/controller/skidding_ai.cpp @@ -602,7 +602,6 @@ void SkiddingAI::handleItemCollectionAndAvoidance(Vec3 *aim_point, float item_angle = atan2(xyz.getX() - m_kart->getXYZ().getX(), xyz.getZ() - m_kart->getXYZ().getZ() ); float angle = normalizeAngle(kart_aim_angle - item_angle); - float d = (m_kart->getXYZ()-item_to_collect->getXYZ()).length(); if(fabsf(angle) < 0.3) { @@ -726,6 +725,7 @@ void SkiddingAI::evaluateItems(const Item *item, float kart_aim_angle, break; case Item::ITEM_TRIGGER: return; break; + default: assert(false); break; } // switch diff --git a/src/karts/controller/skidding_ai.hpp b/src/karts/controller/skidding_ai.hpp index f3c9721ee..6ec4b24f4 100644 --- a/src/karts/controller/skidding_ai.hpp +++ b/src/karts/controller/skidding_ai.hpp @@ -138,13 +138,14 @@ private: * node the kart is on (i.e. if kart is in a left turn, this will be * the last node that is still turning left). */ unsigned int m_last_direction_node; -#ifdef DEBUG - /** For skidding debugging: shows the estimated turn shape. */ - ShowCurve **m_curve; /** If set an item that the AI should aim for. */ const Item *m_item_to_collect; +#ifdef DEBUG + /** For skidding debugging: shows the estimated turn shape. */ + ShowCurve **m_curve; + /** For debugging purpose: a sphere indicating where the AI * is targeting at. */ irr::scene::ISceneNode *m_debug_sphere;