Apply patch to convert printfs to the log API

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12677 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2013-04-19 22:45:58 +00:00
parent 2da4e7b1f6
commit 950bb62f5a
3 changed files with 11 additions and 9 deletions

View File

@ -19,6 +19,7 @@
#include "karts/controller/ai_properties.hpp"
#include "io/xml_node.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
float AIProperties::UNDEFINED = -99.9f;

View File

@ -49,6 +49,7 @@
#include "tracks/quad_graph.hpp"
#include "tracks/track.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp"
EndController::EndController(AbstractKart *kart, StateManager::ActivePlayer *player,
Controller *prev_controller)
@ -214,8 +215,7 @@ void EndController::handleSteering(float dt)
const int next = m_next_node_index[m_track_node];
target_point = QuadGraph::get()->getQuadOfNode(next).getCenter();
#ifdef AI_DEBUG
std::cout << "- Outside of road: steer to center point." <<
std::endl;
Log::debug("end_controller.cpp", "- Outside of road: steer to center point.\n");
#endif
}
else

View File

@ -59,6 +59,7 @@
#include "tracks/quad_graph.hpp"
#include "tracks/track.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp"
#ifdef AI_DEBUG
# include "irrlicht.h"
@ -490,8 +491,7 @@ void SkiddingAI::handleSteering(float dt)
#ifdef AI_DEBUG
m_debug_sphere[0]->setPosition(QuadGraph::get()->getQuadOfNode(next)
.getCenter().toIrrVector());
std::cout << "- Outside of road: steer to center point." <<
std::endl;
Log::debug("skidding_ai","-Outside of road: steer to center point.\n");
#endif
}
//If we are going to crash against a kart, avoid it if it doesn't
@ -525,9 +525,9 @@ void SkiddingAI::handleSteering(float dt)
}
#ifdef AI_DEBUG
std::cout << "- Velocity vector crashes with kart and doesn't " <<
"crashes with road : steer 90 degrees away from kart." <<
std::endl;
Log::debug("skidding_ai", "- Velocity vector crashes with kart "
"and doesn't crashes with road : steer 90 "
"degrees away from kart.\n");
#endif
}
@ -1621,8 +1621,9 @@ void SkiddingAI::checkCrashes(const Vec3& pos )
slip->isSlipstreamReady() &&
slip->getSlipstreamTarget())
{
//printf("%s overtaking %s\n", m_kart->getIdent().c_str(),
// m_kart->getSlipstreamKart()->getIdent().c_str());
//Log::debug("skidding_ai", "%s overtaking %s\n",
// m_kart->getIdent().c_str(),
// m_kart->getSlipstreamKart()->getIdent().c_str());
// FIXME: we might define a minimum distance, and if the target kart
// is too close break first - otherwise the AI hits the kart when
// trying to overtake it, actually speeding the other kart up.