@@ -101,8 +101,13 @@ Particle::Particle(
101
101
m_glow = glow;
102
102
103
103
// Irrlicht stuff
104
- m_collisionbox = aabb3f
105
- (-size/2 ,-size/2 ,-size/2 ,size/2 ,size/2 ,size/2 );
104
+ m_collisionbox = aabb3f (
105
+ -size / 2 ,
106
+ -size / 2 ,
107
+ -size / 2 ,
108
+ size / 2 ,
109
+ size / 2 ,
110
+ size / 2 );
106
111
this ->setAutomaticCulling (scene::EAC_OFF);
107
112
108
113
// Init lighting
@@ -122,7 +127,7 @@ void Particle::OnRegisterSceneNode()
122
127
123
128
void Particle::render ()
124
129
{
125
- video::IVideoDriver* driver = SceneManager->getVideoDriver ();
130
+ video::IVideoDriver * driver = SceneManager->getVideoDriver ();
126
131
driver->setMaterial (m_material);
127
132
driver->setTransform (video::ETS_WORLD, AbsoluteTransformation);
128
133
@@ -293,9 +298,9 @@ ParticleSpawner::ParticleSpawner(
293
298
m_animation = anim;
294
299
m_glow = glow;
295
300
296
- for (u16 i = 0 ; i<= m_amount; i++)
301
+ for (u16 i = 0 ; i <= m_amount; i++)
297
302
{
298
- float spawntime = (float )rand ()/ (float )RAND_MAX* m_spawntime;
303
+ float spawntime = (float )rand () / (float )RAND_MAX * m_spawntime;
299
304
m_spawntimes.push_back (spawntime);
300
305
}
301
306
}
@@ -359,7 +364,7 @@ void ParticleSpawner::spawnParticle(ClientEnvironment *env, float radius,
359
364
));
360
365
}
361
366
362
- void ParticleSpawner::step (float dtime, ClientEnvironment* env)
367
+ void ParticleSpawner::step (float dtime, ClientEnvironment * env)
363
368
{
364
369
m_time += dtime;
365
370
@@ -381,7 +386,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment* env)
381
386
for (std::vector<float >::iterator i = m_spawntimes.begin ();
382
387
i != m_spawntimes.end ();) {
383
388
if ((*i) <= m_time && m_amount > 0 ) {
384
- m_amount-- ;
389
+ --m_amount ;
385
390
386
391
// Pretend to, but don't actually spawn a particle if it is
387
392
// attached to an unloaded object or distant from player.
@@ -408,7 +413,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment* env)
408
413
}
409
414
410
415
411
- ParticleManager::ParticleManager (ClientEnvironment* env) :
416
+ ParticleManager::ParticleManager (ClientEnvironment * env) :
412
417
m_env(env)
413
418
{}
414
419
@@ -570,7 +575,7 @@ void ParticleManager::handleParticleEvent(ClientEvent *event, Client *client,
570
575
// The final burst of particles when a node is finally dug, *not* particles
571
576
// spawned during the digging of a node.
572
577
573
- void ParticleManager::addDiggingParticles (IGameDef* gamedef,
578
+ void ParticleManager::addDiggingParticles (IGameDef * gamedef,
574
579
LocalPlayer *player, v3s16 pos, const MapNode &n, const ContentFeatures &f)
575
580
{
576
581
// No particles for "airlike" nodes
@@ -585,7 +590,7 @@ void ParticleManager::addDiggingParticles(IGameDef* gamedef,
585
590
// During the digging of a node particles are spawned individually by this
586
591
// function, called from Game::handleDigging() in game.cpp.
587
592
588
- void ParticleManager::addNodeParticle (IGameDef* gamedef,
593
+ void ParticleManager::addNodeParticle (IGameDef * gamedef,
589
594
LocalPlayer *player, v3s16 pos, const MapNode &n, const ContentFeatures &f)
590
595
{
591
596
// No particles for "airlike" nodes
@@ -637,7 +642,7 @@ void ParticleManager::addNodeParticle(IGameDef* gamedef,
637
642
else
638
643
n.getColor (f, &color);
639
644
640
- Particle* toadd = new Particle (
645
+ Particle * toadd = new Particle (
641
646
gamedef,
642
647
player,
643
648
m_env,
@@ -660,7 +665,7 @@ void ParticleManager::addNodeParticle(IGameDef* gamedef,
660
665
addParticle (toadd);
661
666
}
662
667
663
- void ParticleManager::addParticle (Particle* toadd)
668
+ void ParticleManager::addParticle (Particle * toadd)
664
669
{
665
670
MutexAutoLock lock (m_particle_list_lock);
666
671
m_particles.push_back (toadd);
0 commit comments