Made AABB of track higher to allow projectiles to fly
higher than the actual height of the track. This fixes #412 (cakes immediately exploding in a basically flat track). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9837 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
0577fa8c91
commit
7abdefca39
@ -681,6 +681,13 @@ bool Track::loadMainTrack(const XMLNode &root)
|
||||
m_all_nodes.push_back(scene_node);
|
||||
|
||||
MeshTools::minMax3D(merged_mesh, &m_aabb_min, &m_aabb_max);
|
||||
// Increase the maximum height of the track: since items that fly
|
||||
// too high explode, e.g. cakes can not be show when being at the
|
||||
// top of the track (since they will explode when leaving the AABB
|
||||
// of the track). While the test for this in Flyable::updateAndDelete
|
||||
// could be relaxed to fix this, it is not certain how the physics
|
||||
// will handle items that are out of the AABB
|
||||
m_aabb_max.setY(m_aabb_max.getY()+30.0f);
|
||||
World::getWorld()->getPhysics()->init(m_aabb_min, m_aabb_max);
|
||||
|
||||
std::map< std::string, std::map< int, std::string > > lod_groups;
|
||||
|
Loading…
Reference in New Issue
Block a user