Removed dead code.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11389 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8b5ee80e55
commit
9a823b64b0
@ -146,8 +146,6 @@ void SkiddingAI::reset()
|
|||||||
{
|
{
|
||||||
m_time_since_last_shot = 0.0f;
|
m_time_since_last_shot = 0.0f;
|
||||||
m_start_kart_crash_direction = 0;
|
m_start_kart_crash_direction = 0;
|
||||||
m_curve_target_speed = m_kart->getCurrentMaxSpeed();
|
|
||||||
m_curve_angle = 0.0;
|
|
||||||
m_start_delay = -1.0f;
|
m_start_delay = -1.0f;
|
||||||
m_time_since_stuck = 0.0f;
|
m_time_since_stuck = 0.0f;
|
||||||
m_kart_ahead = NULL;
|
m_kart_ahead = NULL;
|
||||||
@ -240,7 +238,6 @@ void SkiddingAI::update(float dt)
|
|||||||
//Detect if we are going to crash with the track and/or kart
|
//Detect if we are going to crash with the track and/or kart
|
||||||
checkCrashes(m_kart->getXYZ());
|
checkCrashes(m_kart->getXYZ());
|
||||||
determineTrackDirection();
|
determineTrackDirection();
|
||||||
findCurve();
|
|
||||||
|
|
||||||
// Special behaviour if we have a bomb attach: try to hit the kart ahead
|
// Special behaviour if we have a bomb attach: try to hit the kart ahead
|
||||||
// of us.
|
// of us.
|
||||||
@ -998,34 +995,6 @@ void SkiddingAI::findNonCrashingPoint(Vec3 *result)
|
|||||||
*result = QuadGraph::get()->getQuadOfNode(sector).getCenter();
|
*result = QuadGraph::get()->getQuadOfNode(sector).getCenter();
|
||||||
} // findNonCrashingPoint
|
} // findNonCrashingPoint
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
/**FindCurve() gathers info about the closest sectors ahead: the curve
|
|
||||||
* angle, the direction of the next turn, and the optimal speed at which the
|
|
||||||
* curve can be travelled at it's widest angle.
|
|
||||||
*
|
|
||||||
* The number of sectors that form the curve is dependant on the kart's speed.
|
|
||||||
*/
|
|
||||||
void SkiddingAI::findCurve()
|
|
||||||
{
|
|
||||||
float total_dist = 0.0f;
|
|
||||||
int i;
|
|
||||||
for(i = m_track_node; total_dist < m_kart->getVelocityLC().getZ();
|
|
||||||
i = m_next_node_index[i])
|
|
||||||
{
|
|
||||||
total_dist += QuadGraph::get()->getDistanceToNext(i,
|
|
||||||
m_successor_index[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
m_curve_angle =
|
|
||||||
normalizeAngle(QuadGraph::get()->getAngleToNext(i,
|
|
||||||
m_successor_index[i])
|
|
||||||
-QuadGraph::get()->getAngleToNext(m_track_node,
|
|
||||||
m_successor_index[m_track_node]) );
|
|
||||||
|
|
||||||
m_curve_target_speed = m_kart->getCurrentMaxSpeed();
|
|
||||||
} // findCurve
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/** Determines the direction of the track ahead of the kart: 0 indicates
|
/** Determines the direction of the track ahead of the kart: 0 indicates
|
||||||
* straight, +1 right turn, -1 left turn.
|
* straight, +1 right turn, -1 left turn.
|
||||||
|
@ -113,7 +113,6 @@ private:
|
|||||||
/** Time an item has been collected and not used. */
|
/** Time an item has been collected and not used. */
|
||||||
float m_time_since_last_shot;
|
float m_time_since_last_shot;
|
||||||
|
|
||||||
float m_curve_target_speed;
|
|
||||||
float m_curve_angle;
|
float m_curve_angle;
|
||||||
|
|
||||||
float m_time_since_stuck;
|
float m_time_since_stuck;
|
||||||
@ -152,7 +151,6 @@ private:
|
|||||||
void checkCrashes(const Vec3& pos);
|
void checkCrashes(const Vec3& pos);
|
||||||
void findNonCrashingPoint(Vec3 *result);
|
void findNonCrashingPoint(Vec3 *result);
|
||||||
|
|
||||||
void findCurve();
|
|
||||||
void determineTrackDirection();
|
void determineTrackDirection();
|
||||||
void determineTurnRadius(const Vec3 &start,
|
void determineTurnRadius(const Vec3 &start,
|
||||||
const Vec3 &start_direction,
|
const Vec3 &start_direction,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user