Fix kart selection screen animation if only 1 kart
This commit is contained in:
parent
ad062d3b81
commit
fd7bf80493
@ -193,10 +193,29 @@ PlayerKartWidget::PlayerKartWidget(KartSelectionScreen* parent,
|
||||
scale = 30.0f;
|
||||
}
|
||||
|
||||
const bool has_win_anime =
|
||||
UserConfigParams::m_show_steering_animations != 0 &&
|
||||
(((kart_model.getFrame(KartModel::AF_WIN_LOOP_START) > -1 ||
|
||||
kart_model.getFrame(KartModel::AF_WIN_START) > -1) &&
|
||||
kart_model.getFrame(KartModel::AF_WIN_END) > -1) ||
|
||||
(kart_model.getFrame(KartModel::AF_SELECTION_START) > -1 &&
|
||||
kart_model.getFrame(KartModel::AF_SELECTION_END) > -1));
|
||||
m_model_view->addModel( kart_model.getModel(), Vec3(0,0,0),
|
||||
Vec3(scale, scale, scale),
|
||||
has_win_anime ?
|
||||
kart_model.getFrame(KartModel::AF_SELECTION_START) > -1 ?
|
||||
kart_model.getFrame(KartModel::AF_SELECTION_START) :
|
||||
kart_model.getFrame(KartModel::AF_WIN_LOOP_START) > -1 ?
|
||||
kart_model.getFrame(KartModel::AF_WIN_LOOP_START) :
|
||||
kart_model.getFrame(KartModel::AF_WIN_START) :
|
||||
kart_model.getBaseFrame(),
|
||||
kart_model.getBaseFrame() );
|
||||
has_win_anime ?
|
||||
kart_model.getFrame(KartModel::AF_SELECTION_END) > -1 ?
|
||||
kart_model.getFrame(KartModel::AF_SELECTION_END) :
|
||||
kart_model.getFrame(KartModel::AF_WIN_END) :
|
||||
kart_model.getBaseFrame(),
|
||||
false/*all_parts_colorized*/,
|
||||
kart_model.getAnimationSpeed());
|
||||
m_model_view->addModel( kart_model.getWheelModel(0),
|
||||
kart_model.getWheelGraphicsPosition(0) );
|
||||
m_model_view->addModel( kart_model.getWheelModel(1),
|
||||
|
Loading…
Reference in New Issue
Block a user