Removed unnecessary parameters kart and track from

TrackSector::update.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9997 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-10-16 12:29:37 +00:00
parent 830e88d1e5
commit 23af52985f
4 changed files with 7 additions and 7 deletions

View File

@ -77,7 +77,7 @@ RubberBall::RubberBall(Kart *kart, Track* track)
// initialises the current graph node // initialises the current graph node
TrackSector::update(getXYZ(), kart, m_track); TrackSector::update(getXYZ());
initializeControlPoints(m_owner->getXYZ()); initializeControlPoints(m_owner->getXYZ());
// At the start the ball aims at quads till it gets close enough to the // At the start the ball aims at quads till it gets close enough to the
@ -354,7 +354,7 @@ bool RubberBall::updateAndDelete(float dt)
next_xyz.setY(new_y); next_xyz.setY(new_y);
// Determine new distance along track // Determine new distance along track
TrackSector::update(next_xyz, m_owner, m_track); TrackSector::update(next_xyz);
// Ball squashing: // Ball squashing:
// =============== // ===============

View File

@ -63,7 +63,7 @@ void LinearWorld::init()
for(unsigned int n=0; n<kart_amount; n++) for(unsigned int n=0; n<kart_amount; n++)
{ {
KartInfo info; KartInfo info;
info.getSector()->update(m_karts[n]->getXYZ(), m_karts[n], m_track); info.getSector()->update(m_karts[n]->getXYZ());
m_kart_info.push_back(info); m_kart_info.push_back(info);
} // next kart } // next kart
@ -93,7 +93,7 @@ void LinearWorld::restartRace()
for(unsigned int i=0; i<kart_amount; i++) for(unsigned int i=0; i<kart_amount; i++)
{ {
m_kart_info[i].reset(); m_kart_info[i].reset();
m_kart_info[i].getSector()->update(m_karts[i]->getXYZ(), m_karts[i], m_track); m_kart_info[i].getSector()->update(m_karts[i]->getXYZ());
} // next kart } // next kart
// First all kart infos must be updated before the kart position can be // First all kart infos must be updated before the kart position can be
@ -154,7 +154,7 @@ void LinearWorld::update(float dt)
// rescued or eliminated // rescued or eliminated
if(kart->playingEmergencyAnimation()) continue; if(kart->playingEmergencyAnimation()) continue;
kart_info.getSector()->update(kart->getXYZ(), kart, m_track); kart_info.getSector()->update(kart->getXYZ());
} // for n } // for n
// Update all positions. This must be done after _all_ karts have // Update all positions. This must be done after _all_ karts have

View File

@ -47,7 +47,7 @@ void TrackSector::reset()
* the specified point. * the specified point.
* \param xyz The new coordinates to search the graph node for. * \param xyz The new coordinates to search the graph node for.
*/ */
void TrackSector::update(const Vec3 &xyz, Kart* kart, Track* track) void TrackSector::update(const Vec3 &xyz)
{ {
int prev_sector = m_current_graph_node; int prev_sector = m_current_graph_node;

View File

@ -59,7 +59,7 @@ public:
TrackSector(); TrackSector();
void reset(); void reset();
void rescue(); void rescue();
void update(const Vec3 &xyz, Kart* kart, Track* track); void update(const Vec3 &xyz);
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
/** Returns how far the the object is from the start line. */ /** Returns how far the the object is from the start line. */
float getDistanceFromStart() const { return m_current_track_coords.getZ();} float getDistanceFromStart() const { return m_current_track_coords.getZ();}