Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2006, 11:18:22 AM (18 years ago)
Author:
marcscha
Message:

velocity fix

Location:
branches/playability/src/world_entities/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/projectiles/mbolt.cc

    r10081 r10095  
    7777
    7878 
    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);
    8181  this->trail->setTexture( "maps/laser.png");
     82  this->trail->setAbsCoor(this->getAbsCoor() - Vector(1,0,0));
    8283}
    8384
     
    126127  this->emitter->setEmissionRate(10.0);
    127128  this->emitter->setEmissionVelocity(0);
    128   this->updateNode(0);
    129129}
    130130
     
    144144void MBolt::collidesWith(WorldEntity* entity, const Vector& location)
    145145{
    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)
    148148    return;
    149149
    150150  PRINTF(0)("MBolt collides\n");
    151151  dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());
    152   entity->destroy(this);
    153   this->deactivate();
     152  //entity->destroy(this);
     153  //this->deactivate();
    154154}
    155155
  • branches/playability/src/world_entities/projectiles/swarm_projectile.cc

    r10087 r10095  
    5959  this->physDamage = 200;
    6060
    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);
    6363  this->trail->setTexture( "maps/laser.png");
    6464}
     
    240240  this->lastDir = this->curDir;
    241241  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  }
    242247}
    243248
Note: See TracChangeset for help on using the changeset viewer.