[Orxonox-commit 1380] r6098 - code/branches/particles2/src/modules/weapons/projectiles
cdaniel at orxonox.net
cdaniel at orxonox.net
Wed Nov 18 17:19:29 CET 2009
Author: cdaniel
Date: 2009-11-18 17:19:28 +0100 (Wed, 18 Nov 2009)
New Revision: 6098
Modified:
code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc
Log:
Fixed Rocket.cc (starts now in correct direction when played with windows) and added/changed some particle effects
Modified: code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc 2009-11-18 16:13:26 UTC (rev 6097)
+++ code/branches/particles2/src/modules/weapons/projectiles/Rocket.cc 2009-11-18 16:19:28 UTC (rev 6098)
@@ -50,6 +50,8 @@
Rocket::Rocket(BaseObject* creator) : ControllableEntity(creator)
{
RegisterObject(Rocket);// - register the Rocket class to the core
+
+ this->localAngularVelocity_ = 0;
if (GameMode::isMaster())
{
@@ -59,8 +61,12 @@
this->bDestroy_ = false;
this->model_ = new Model(this);
- this->model_->setMeshSource("rocket_test.mesh");
- this->attach(this->model_);
+ this->model_->setMeshSource("rocket.mesh");
+ this->attach(this->model_);
+ ParticleSpawner* fire = new ParticleSpawner(this);
+ this->attach(fire);
+ fire->setOrientation(this->getOrientation());
+ fire->setSource("Orxonox/rocketfire");
this->enableCollisionCallback();
this->setCollisionResponse(false);
@@ -72,6 +78,8 @@
this->attachCollisionShape(this->collisionShape_);
this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&Rocket::destroyObject, this)));
+
+
}
this->camPosition_ = new CameraPosition(this);
@@ -155,9 +163,10 @@
effect->setPosition(this->getPosition());
effect->setOrientation(this->getOrientation());
effect->setDestroyAfterLife(true);
- effect->setSource("Orxonox/explosion3");
+ effect->setSource("Orxonox/explosion4");
effect->setLifetime(2.0f);
}
+
{
ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
effect->setPosition(this->getPosition());
@@ -195,9 +204,10 @@
effect->setPosition(this->getPosition());
effect->setOrientation(this->getOrientation());
effect->setDestroyAfterLife(true);
- effect->setSource("Orxonox/explosion3");
+ effect->setSource("Orxonox/explosion4");
effect->setLifetime(2.0f);
}
+
{
ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
effect->setPosition(this->getPosition());
More information about the Orxonox-commit
mailing list