Better fix for #2687

This commit is contained in:
auria.mg 2016-12-17 18:49:00 -05:00
parent 2b13a5643e
commit da795b69ed
3 changed files with 1 additions and 21 deletions

View File

@ -94,7 +94,7 @@ void Camera::changeCamera(unsigned int camera_index, CameraType type)
if(old_camera->getType()==type) return;
Camera *new_camera = createCamera(old_camera->getIndex(), type,
old_camera->m_kart );
old_camera->m_original_kart);
// Replace the previous camera
m_all_cameras[camera_index] = new_camera;
if(s_active_camera == old_camera)

View File

@ -85,19 +85,6 @@ void FollowTheLeaderRace::reset()
WorldStatus::setClockMode(WorldStatus::CLOCK_COUNTDOWN,
m_leader_intervals[0]);
const unsigned int kart_amount = (unsigned int)m_karts.size();
int idCamera = 0;
for (unsigned int n = 1; n < kart_amount; n++)
{
if (m_karts[n]->getController()->isPlayerController())
{
Camera *camera = Camera::getCamera(idCamera);
camera->setMode(Camera::CM_NORMAL);
camera->setKart(getKart(n));
idCamera++;
}
}
m_is_over_delay = 2.0f;
} // reset

View File

@ -118,13 +118,6 @@ void ThreeStrikesBattle::reset()
// no positions in this mode
m_karts[n]->setPosition(-1);
if (m_karts[n]->getController()->isPlayerController())
{
Camera *camera = Camera::getCamera(idCamera);
camera->setKart(m_karts[n]);
idCamera++;
}
scene::ISceneNode* kart_node = m_karts[n]->getNode();
core::list<scene::ISceneNode*>& children = kart_node->getChildren();