From 23af52985f0ec6296361871aa6921148f976307c Mon Sep 17 00:00:00 2001 From: hikerstk Date: Sun, 16 Oct 2011 12:29:37 +0000 Subject: [PATCH] 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 --- src/items/rubber_ball.cpp | 4 ++-- src/modes/linear_world.cpp | 6 +++--- src/tracks/track_sector.cpp | 2 +- src/tracks/track_sector.hpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/items/rubber_ball.cpp b/src/items/rubber_ball.cpp index 260101b2c..edd42d321 100644 --- a/src/items/rubber_ball.cpp +++ b/src/items/rubber_ball.cpp @@ -77,7 +77,7 @@ RubberBall::RubberBall(Kart *kart, Track* track) // initialises the current graph node - TrackSector::update(getXYZ(), kart, m_track); + TrackSector::update(getXYZ()); initializeControlPoints(m_owner->getXYZ()); // 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); // Determine new distance along track - TrackSector::update(next_xyz, m_owner, m_track); + TrackSector::update(next_xyz); // Ball squashing: // =============== diff --git a/src/modes/linear_world.cpp b/src/modes/linear_world.cpp index 9ecb4a9a7..e316108ac 100644 --- a/src/modes/linear_world.cpp +++ b/src/modes/linear_world.cpp @@ -63,7 +63,7 @@ void LinearWorld::init() for(unsigned int n=0; nupdate(m_karts[n]->getXYZ(), m_karts[n], m_track); + info.getSector()->update(m_karts[n]->getXYZ()); m_kart_info.push_back(info); } // next kart @@ -93,7 +93,7 @@ void LinearWorld::restartRace() for(unsigned int i=0; iupdate(m_karts[i]->getXYZ(), m_karts[i], m_track); + m_kart_info[i].getSector()->update(m_karts[i]->getXYZ()); } // next kart // 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 if(kart->playingEmergencyAnimation()) continue; - kart_info.getSector()->update(kart->getXYZ(), kart, m_track); + kart_info.getSector()->update(kart->getXYZ()); } // for n // Update all positions. This must be done after _all_ karts have diff --git a/src/tracks/track_sector.cpp b/src/tracks/track_sector.cpp index 0fcbc527d..7483228b9 100644 --- a/src/tracks/track_sector.cpp +++ b/src/tracks/track_sector.cpp @@ -47,7 +47,7 @@ void TrackSector::reset() * the specified point. * \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; diff --git a/src/tracks/track_sector.hpp b/src/tracks/track_sector.hpp index 325cd28bf..00262343c 100644 --- a/src/tracks/track_sector.hpp +++ b/src/tracks/track_sector.hpp @@ -59,7 +59,7 @@ public: TrackSector(); void reset(); 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. */ float getDistanceFromStart() const { return m_current_track_coords.getZ();}