Fixed redeclaration of m_debug_sphere. Improved AI turning while reversing.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/battleAI@14684 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
420e73d102
commit
13ddb2bfbe
@ -125,8 +125,10 @@ void BattleAI::handleGetUnstuck(const float dt)
|
||||
}
|
||||
if(m_currently_reversing == true)
|
||||
{
|
||||
setSteering(-1.0f*m_target_angle,dt);
|
||||
setSteering(-2.0f*m_target_angle,dt);
|
||||
m_controls->m_accel = -0.34f;
|
||||
setSteering(-2.0f*m_target_angle,dt);
|
||||
m_controls->m_accel = -0.35f;
|
||||
/*
|
||||
if(m_target_angle > 0)
|
||||
setSteering(M_PI,dt);
|
||||
@ -135,7 +137,7 @@ void BattleAI::handleGetUnstuck(const float dt)
|
||||
m_time_since_stuck += dt;
|
||||
|
||||
|
||||
if(m_time_since_stuck >= 0.7f)
|
||||
if(m_time_since_stuck >= 0.6f)
|
||||
{
|
||||
m_currently_reversing = false;
|
||||
std::cout<<"GOT UNSTUCK\n";
|
||||
|
@ -53,16 +53,6 @@ private:
|
||||
float m_time_since_stuck;
|
||||
bool m_currently_reversing;
|
||||
|
||||
#ifdef DEBUG
|
||||
/** For debugging purpose: a sphere indicating where the AI
|
||||
* is targeting at. */
|
||||
irr::scene::ISceneNode *m_debug_sphere;
|
||||
|
||||
/** For item debugging: set to the item that is selected to
|
||||
* be collected. */
|
||||
irr::scene::ISceneNode *m_item_sphere;
|
||||
#endif
|
||||
|
||||
void handleAcceleration(const float dt) {};
|
||||
void handleSteering(const float dt);
|
||||
void handleBraking() {};
|
||||
|
@ -429,14 +429,13 @@ bool ThreeStrikesBattle::isRaceOver()
|
||||
|
||||
return getCurrentNumKarts()==1 || getCurrentNumPlayers()==0;
|
||||
} // isRaceOver
|
||||
#include <iostream>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Updates the m_current_node value of each kart controller to localize it
|
||||
* on the navigation mesh.
|
||||
*/
|
||||
void ThreeStrikesBattle::updateKartNodes()
|
||||
{
|
||||
|
||||
const unsigned int n = getNumKarts();
|
||||
for(unsigned int i=0; i<n; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user