diff --git a/src/graphics/particle_emitter.cpp b/src/graphics/particle_emitter.cpp index a14fbab89..4d26affd2 100644 --- a/src/graphics/particle_emitter.cpp +++ b/src/graphics/particle_emitter.cpp @@ -68,7 +68,7 @@ ParticleEmitter::ParticleEmitter(ParticleKind* type, core::vector3df position, { // FIXME: does the maxAngle param work at all?? // FIXME: the min and max color params don't appear to work - m_emitter = m_node->createPointEmitter(core::vector3df(0.0f, 0.0f, 0.0f), // velocity in m/ms + m_emitter = m_node->createPointEmitter(core::vector3df(0.0f, 0.0f, 5.0f), // velocity in m/ms type->getMinRate(), type->getMaxRate(), type->getMinColor(), type->getMaxColor(), lifeTimeMin, lifeTimeMax, @@ -87,7 +87,7 @@ ParticleEmitter::ParticleEmitter(ParticleKind* type, core::vector3df position, m_node->setPosition(core::vector3df(position.X + box_x, position.Y + box_y, position.Z + box_z)); m_emitter = m_node->createBoxEmitter(core::aabbox3df(-box_x, -box_y, -box_z, box_x, box_y, box_z), - core::vector3df(0.0f, 0.0f, 0.0f), // velocity in m/ms + core::vector3df(0.0f, 0.0f, 5.0f), // velocity in m/ms type->getMinRate(), type->getMaxRate(), type->getMinColor(), type->getMaxColor(), lifeTimeMin, lifeTimeMax, @@ -110,7 +110,7 @@ ParticleEmitter::ParticleEmitter(ParticleKind* type, core::vector3df position, // FIXME: this is ridiculous, the fadeout time should be equal to the lifetime, except that the // lifetime is random... - scene::IParticleFadeOutAffector *af = m_node->createFadeOutParticleAffector(video::SColor(0, 0, 0, 0), + scene::IParticleFadeOutAffector *af = m_node->createFadeOutParticleAffector(video::SColor(0, 255, 255, 255), type->getFadeoutTime()); m_node->addAffector(af); af->drop(); diff --git a/src/input/input_manager.cpp b/src/input/input_manager.cpp index 2b3e6a84e..d8cc72f5e 100644 --- a/src/input/input_manager.cpp +++ b/src/input/input_manager.cpp @@ -171,10 +171,18 @@ void InputManager::handleStaticAction(int key, int value) break; case KEY_F8: - if(value && control_is_pressed) + if(value) { - RaceGUIBase* gui = World::getWorld()->getRaceGUI(); - if (gui != NULL) gui->m_enabled = !gui->m_enabled; + if (control_is_pressed) + { + RaceGUIBase* gui = World::getWorld()->getRaceGUI(); + if (gui != NULL) gui->m_enabled = !gui->m_enabled; + } + else + { + Kart* kart = world->getLocalPlayerKart(0); + kart->setEnergy(100.0f); + } } break; diff --git a/src/karts/kart.hpp b/src/karts/kart.hpp index 48aa663ac..26f545e31 100644 --- a/src/karts/kart.hpp +++ b/src/karts/kart.hpp @@ -398,6 +398,8 @@ public: * the upright constraint to allow for more realistic explosions. */ bool isNearGround () const; // ------------------------------------------------------------------------ + + void setEnergy (float val) { m_collected_energy = val; } };