Added option to scale powerup models (Arthur, feel free to

tweak the size of the ball - *grin* try "2 5 2" for some fun).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9324 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-07-22 11:47:37 +00:00
parent 2c3e5395c6
commit f2226e1335
2 changed files with 10 additions and 2 deletions

View File

@ -16,7 +16,7 @@
<item name="switch" icon="swap-icon.png" />
<item name="swatter" icon="swatter-icon.png" />
<item name="rubber-ball" icon="rubber_ball-icon.png"
model="rubber_ball.b3d" speed="30.0"
model="rubber_ball.b3d" speed="35.0" scale="1 1 1"
interval="1" max-height="4.0" />
<item name="parachute" icon="parachute-icon.png"
model="parachute.b3d" />

View File

@ -27,6 +27,7 @@
#endif
#include <math.h>
#include <IMeshManipulator.h>
#include <IMeshSceneNode.h>
#include "graphics/irr_driver.hpp"
@ -218,6 +219,13 @@ void Flyable::init(const XMLNode &node, scene::IMesh *model,
node.get("min-height", &(m_st_min_height[type]) );
node.get("max-height", &(m_st_max_height[type]) );
node.get("force-updown", &(m_st_force_updown[type]));
core::vector3df scale(1.0f, 1.0f, 1.0f);
if(node.get("scale", &scale))
{
irr::scene::IMeshManipulator *mani =
irr_driver->getVideoDriver()->getMeshManipulator();
mani->scale(model, scale);
}
// Store the size of the model
Vec3 min, max;