Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2007, 3:35:24 AM (17 years ago)
Author:
nicolasc
Message:

moved loadShield (XML), some minor cleanup

File:
1 edited

Legend:

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

    r10747 r10763  
    5252  this->loadModel("models/projectiles/mbolt.obj",4);
    5353
    54 
    55   //this->loadModel("models/projectiles/laser.obj");
    56 
    5754  this->setMinEnergy(4);
    5855  this->setHealthMax(0);
     
    6057  this->angle     = 0;
    6158
    62   //this->emitter = new DotEmitter(1000, 0, 0);
    6359  this->emitter = new DotEmitter(50, 0, 0);
    6460  this->emitter->setParent(this);
     
    6965
    7066  this->mat = new Material("mBolt");
    71   //this->mat->setBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    7267  this->mat->setBlendFunc(GL_SRC_ALPHA,GL_ONE);
    7368  this->mat->setDiffuse(1,1,1);
     
    8277
    8378  this->trail = new Trail(6, 4, .1, this);
    84   //this->trail->setParent( this);
    8579  this->trail->setTexture( "textures/laser.png");
    86 //   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
    8780  this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7);
    88  
     81
    8982  this->obbTree = new OBBTree();
    9083  this->obbTree->createBox(Vector(0.0f, 0.0f, 0.0f), Vector(1.0f, 1.0f, 1.0f));
     
    117110void MBolt::activate()
    118111{
    119 //   this->origList = this->getOMListNumber();
    120 //   this->toList(OM_ENVIRON);
    121112  if (unlikely(MBolt::explosionParticles == NULL))
    122113  {
     
    154145  MBolt::fastFactory->kill(this);
    155146}
     147  // HACK direction AbsDir calulation
    156148
    157149void MBolt::hit (float damage, WorldEntity* entity )
     
    161153    this->destroy( entity );
    162154  this->hitEntity = entity;
    163  // dynamic_cast<SpaceShip*>(entity)->damage(this->getPhysDamage(),this->getElecDamage());
    164   //this->destroy(this);
     155
    165156  this->deactivate();
    166157
     
    175166void MBolt::tick (float dt)
    176167{
    177   //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
    178168  Vector v = this->velocity * dt;
    179169  this->shiftCoor(v);
     
    191181void MBolt::destroy (WorldEntity* killer)
    192182{
    193   //this->deactivate();
    194183  Projectile::destroy( killer );
    195184  PRINTF(5)("DESTROY MBolt\n");
Note: See TracChangeset for help on using the changeset viewer.