Changeset 10095 in orxonox.OLD for branches/playability/src/world_entities/projectiles
- Timestamp:
- Dec 19, 2006, 11:18:22 AM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/mbolt.cc
r10081 r10095 77 77 78 78 79 this->trail = new Trail(6, 1,.4);80 this->trail->setParent( this);79 this->trail = new Trail(6,4,.1, this); 80 //this->trail->setParent( this); 81 81 this->trail->setTexture( "maps/laser.png"); 82 this->trail->setAbsCoor(this->getAbsCoor() - Vector(1,0,0)); 82 83 } 83 84 … … 126 127 this->emitter->setEmissionRate(10.0); 127 128 this->emitter->setEmissionVelocity(0); 128 this->updateNode(0);129 129 } 130 130 … … 144 144 void MBolt::collidesWith(WorldEntity* entity, const Vector& location) 145 145 { 146 PRINTF( 0)("MBolt collides pretest\n");147 if( entity == NULL || dynamic_cast<SpaceShip*>(entity) == NULL)146 PRINTF(5)("MBolt collides pretest\n"); 147 if( entity == NULL) 148 148 return; 149 149 150 150 PRINTF(0)("MBolt collides\n"); 151 151 dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage()); 152 entity->destroy(this);153 this->deactivate();152 //entity->destroy(this); 153 //this->deactivate(); 154 154 } 155 155 -
branches/playability/src/world_entities/projectiles/swarm_projectile.cc
r10087 r10095 59 59 this->physDamage = 200; 60 60 61 this->trail = new Trail(2.5,4,.2 );62 this->trail->setParent( this);61 this->trail = new Trail(2.5,4,.2, this); 62 //this->trail->setParent( this); 63 63 this->trail->setTexture( "maps/laser.png"); 64 64 } … … 240 240 this->lastDir = this->curDir; 241 241 this->curDir = this->velocity; 242 if( (this->getAbsCoor() - this->target->getAbsCoor()).len() < 4) // FIXME Temp fake workaround for collision :) 243 { 244 dynamic_cast<WorldEntity*>(target)->destroy( this); 245 this->destroy( this); 246 } 242 247 } 243 248
Note: See TracChangeset
for help on using the changeset viewer.