Fixed crash related to locked karts
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5969 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
599d0a806a
commit
d9f64b1bd0
@ -727,22 +727,25 @@ public:
|
||||
{
|
||||
//printf("%s\n", selectionID.c_str());
|
||||
const KartProperties *kp = kart_properties_manager->getKart(selectionID);
|
||||
const KartModel &kart_model = kp->getMasterKartModel();
|
||||
|
||||
w3->clearModels();
|
||||
w3->addModel( kart_model.getModel(), Vec3(0,0,0),
|
||||
kart_model.getBaseFrame() );
|
||||
w3->addModel( kart_model.getWheelModel(0),
|
||||
kart_model.getWheelGraphicsPosition(0) );
|
||||
w3->addModel( kart_model.getWheelModel(1),
|
||||
kart_model.getWheelGraphicsPosition(1) );
|
||||
w3->addModel( kart_model.getWheelModel(2),
|
||||
kart_model.getWheelGraphicsPosition(2) );
|
||||
w3->addModel( kart_model.getWheelModel(3),
|
||||
kart_model.getWheelGraphicsPosition(3) );
|
||||
w3->update(0);
|
||||
if (kp != NULL)
|
||||
{
|
||||
const KartModel &kart_model = kp->getMasterKartModel();
|
||||
|
||||
w3->clearModels();
|
||||
w3->addModel( kart_model.getModel(), Vec3(0,0,0),
|
||||
kart_model.getBaseFrame() );
|
||||
w3->addModel( kart_model.getWheelModel(0),
|
||||
kart_model.getWheelGraphicsPosition(0) );
|
||||
w3->addModel( kart_model.getWheelModel(1),
|
||||
kart_model.getWheelGraphicsPosition(1) );
|
||||
w3->addModel( kart_model.getWheelModel(2),
|
||||
kart_model.getWheelGraphicsPosition(2) );
|
||||
w3->addModel( kart_model.getWheelModel(3),
|
||||
kart_model.getWheelGraphicsPosition(3) );
|
||||
w3->update(0);
|
||||
|
||||
m_parent->m_kart_widgets[playerID].m_kart_name->setText( selectionText.c_str() );
|
||||
m_parent->m_kart_widgets[playerID].m_kart_name->setText( selectionText.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
m_parent->m_kart_widgets[playerID].setKartInternalName(selectionID);
|
||||
|
Loading…
Reference in New Issue
Block a user