Fixed bubble gums.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4988 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
bbb58408e4
commit
37b842e4c0
@ -163,14 +163,14 @@ void Powerup::use()
|
|||||||
m_sound_use->position(m_owner->getXYZ());
|
m_sound_use->position(m_owner->getXYZ());
|
||||||
m_sound_use->play();
|
m_sound_use->play();
|
||||||
btVector3 pos = m_owner->getXYZ();
|
btVector3 pos = m_owner->getXYZ();
|
||||||
float z_coord = Track::NOHIT;
|
float up_coord = Track::NOHIT;
|
||||||
Vec3 normal;
|
Vec3 normal;
|
||||||
const Material* unused2;
|
const Material* unused2;
|
||||||
world->getTrack()->getTerrainInfo(pos, &z_coord, &normal, &unused2);
|
world->getTrack()->getTerrainInfo(pos, &up_coord, &normal, &unused2);
|
||||||
normal.normalize();
|
normal.normalize();
|
||||||
assert(z_coord != Track::NOHIT);
|
assert(up_coord != Track::NOHIT);
|
||||||
|
|
||||||
pos.setZ(z_coord-0.05f);
|
pos.setY(up_coord-0.05f);
|
||||||
|
|
||||||
item_manager->newItem(Item::ITEM_BUBBLEGUM, pos, normal, m_owner);
|
item_manager->newItem(Item::ITEM_BUBBLEGUM, pos, normal, m_owner);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user