Arrow position should depend on height of the kart rather than position of the hat.
Not every kart have/should have a hat (puffy?). A lot of add-on karts probably never will have defined hat offset. Also hats position is now broken a little. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14128 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a39a3e0880
commit
ec02f2990b
@ -360,14 +360,16 @@ void SoccerWorld::initKartList()
|
||||
//Assigning indicators
|
||||
for(unsigned int i=0; i<kart_amount; i++)
|
||||
{
|
||||
scene::ISceneNode *hatNode;
|
||||
scene::ISceneNode *arrowNode;
|
||||
float arrow_pos_height = m_karts[i]->getKartModel()->getHeight()+0.5;
|
||||
|
||||
if(race_manager->getLocalKartInfo(i).getSoccerTeam() == SOCCER_TEAM_RED)
|
||||
hatNode = irr_driver->addBillboard(core::dimension2d<irr::f32>(0.3f,0.3f),
|
||||
arrowNode = irr_driver->addBillboard(core::dimension2d<irr::f32>(0.3f,0.3f),
|
||||
redTeamTexture,m_karts[i]->getNode(), true);
|
||||
else
|
||||
hatNode = irr_driver->addBillboard(core::dimension2d<irr::f32>(0.3f,0.3f),
|
||||
arrowNode = irr_driver->addBillboard(core::dimension2d<irr::f32>(0.3f,0.3f),
|
||||
blueTeamTexture,m_karts[i]->getNode(),true);
|
||||
hatNode->setPosition(m_karts[i]->getKartModel()->getHatOffset());
|
||||
arrowNode->setPosition(core::vector3df(0, arrow_pos_height, 0));
|
||||
}
|
||||
|
||||
// Compute start positions for each team
|
||||
|
Loading…
Reference in New Issue
Block a user