We now have only one spread angle
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7298 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4e5e7f96a8
commit
8724502d91
@ -1,13 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<particles emitter="box" box_x="0.5" box_y="0.1" box_z="0.5">
|
||||
|
||||
<spreading x="120"
|
||||
y="100"
|
||||
z="120" />
|
||||
<spreading angle="40" />
|
||||
|
||||
<velocity x="0.002"
|
||||
y="0.002"
|
||||
z="0.002" />
|
||||
<velocity x="0.000"
|
||||
y="0.000"
|
||||
z="0.002" />
|
||||
|
||||
<material file="nitro-particle.png" />
|
||||
|
||||
@ -21,10 +19,10 @@
|
||||
|
||||
<!-- Size of the particles -->
|
||||
<size min="0.22"
|
||||
max="0.5" />
|
||||
max="0.5" />
|
||||
|
||||
<color min="255 255 255"
|
||||
max="255 255 255" />
|
||||
max="255 255 255" />
|
||||
|
||||
<!-- How much time in milliseconds before the particle is fully faded out -->
|
||||
<fadeout time="1000" />
|
||||
|
@ -74,7 +74,7 @@ ParticleEmitter::ParticleEmitter(ParticleKind* type, core::vector3df position,
|
||||
type->getMinRate(), type->getMaxRate(),
|
||||
type->getMinColor(), type->getMaxColor(),
|
||||
lifeTimeMin, lifeTimeMax,
|
||||
m_particle_type->getAngleSpreadX() /* angle */
|
||||
m_particle_type->getAngleSpread() /* angle */
|
||||
);
|
||||
break;
|
||||
}
|
||||
@ -94,7 +94,7 @@ ParticleEmitter::ParticleEmitter(ParticleKind* type, core::vector3df position,
|
||||
type->getMinRate(), type->getMaxRate(),
|
||||
type->getMinColor(), type->getMaxColor(),
|
||||
lifeTimeMin, lifeTimeMax,
|
||||
m_particle_type->getAngleSpreadX() /* angle */
|
||||
m_particle_type->getAngleSpread() /* angle */
|
||||
);
|
||||
|
||||
//irr_driver->getSceneManager()->addCubeSceneNode(2.0f, parent, -1, position, core::vector3df(0, 0, 0) /* rotation */,
|
||||
|
@ -31,21 +31,19 @@
|
||||
ParticleKind::ParticleKind(const std::string file) : m_min_start_color(255,255,255,255), m_max_start_color(255,255,255,255)
|
||||
{
|
||||
// ---- Initial values to prevent readin uninitialized values
|
||||
m_max_size = 0.5f;
|
||||
m_min_size = 0.5f;
|
||||
m_shape = EMITTER_POINT;
|
||||
m_material = NULL;
|
||||
m_min_rate = 10;
|
||||
m_max_rate = 10;
|
||||
m_lifetime_min = 400;
|
||||
m_lifetime_max = 400;
|
||||
m_fadeout_time = 400;
|
||||
m_box_x = 0.5f;
|
||||
m_box_y = 0.5f;
|
||||
m_box_z = 0.5f;
|
||||
m_angle_spread_x = 90;
|
||||
m_angle_spread_y = 90;
|
||||
m_angle_spread_z = 90;
|
||||
m_max_size = 0.5f;
|
||||
m_min_size = 0.5f;
|
||||
m_shape = EMITTER_POINT;
|
||||
m_material = NULL;
|
||||
m_min_rate = 10;
|
||||
m_max_rate = 10;
|
||||
m_lifetime_min = 400;
|
||||
m_lifetime_max = 400;
|
||||
m_fadeout_time = 400;
|
||||
m_box_x = 0.5f;
|
||||
m_box_y = 0.5f;
|
||||
m_box_z = 0.5f;
|
||||
m_angle_spread = 45;
|
||||
m_velocity_x = 0.001f;
|
||||
m_velocity_y = 0.001f;
|
||||
m_velocity_z = 0.001f;
|
||||
@ -93,9 +91,7 @@ ParticleKind::ParticleKind(const std::string file) : m_min_start_color(255,255,2
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
const XMLNode* spreading = xml->getNode("spreading");
|
||||
spreading->get("x", &m_angle_spread_x);
|
||||
spreading->get("y", &m_angle_spread_y);
|
||||
spreading->get("z", &m_angle_spread_z);
|
||||
spreading->get("angle", &m_angle_spread);
|
||||
|
||||
//std::cout << "m_spread_factor = " << m_spread_factor << "\n";
|
||||
|
||||
|
@ -47,9 +47,7 @@ private:
|
||||
float m_max_size;
|
||||
float m_min_size;
|
||||
|
||||
int m_angle_spread_x;
|
||||
int m_angle_spread_y;
|
||||
int m_angle_spread_z;
|
||||
int m_angle_spread;
|
||||
|
||||
float m_velocity_x;
|
||||
float m_velocity_y;
|
||||
@ -105,10 +103,8 @@ public:
|
||||
float getBoxSizeY () const { return m_box_y; }
|
||||
float getBoxSizeZ () const { return m_box_z; }
|
||||
|
||||
int getAngleSpreadX() const { return m_angle_spread_x; }
|
||||
int getAngleSpreadY() const { return m_angle_spread_y; }
|
||||
int getAngleSpreadZ() const { return m_angle_spread_z; }
|
||||
|
||||
int getAngleSpread () const { return m_angle_spread; }
|
||||
|
||||
float getVelocityX () const { return m_velocity_x; }
|
||||
float getVelocityY () const { return m_velocity_y; }
|
||||
float getVelocityZ () const { return m_velocity_z; }
|
||||
|
Loading…
Reference in New Issue
Block a user