Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10260 in orxonox.OLD


Ignore:
Timestamp:
Jan 17, 2007, 4:00:23 PM (17 years ago)
Author:
nicolasc
Message:
 
Location:
branches/playability/src/world_entities
Files:
6 edited

Legend:

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

    r10196 r10260  
    140140
    141141  angle += rotationSpeed * dt;
     142
     143/*  printf( "spike tick\n" );*/
    142144}
    143145
  • branches/playability/src/world_entities/projectiles/spike_ball.cc

    r10256 r10260  
    6868
    6969  this->size = 4;
     70
     71  this->launcher = new Vector [this->getFragments()];
     72
    7073//   this->fastFactory = tFastFactory<Spike>::getFastFactory(CL_SPIKE, "Spike");
    7174
     
    120123    SpikeBall::explosionParticles->setColor(1.0, .8,.8,.7,.0);
    121124  }
    122 
    123125  this->setDamage(5);
    124126  this->setHealth(0);
     
    177179{
    178180  Spike* pj = NULL;
    179 
     181/*  printf( "KA-" );*/
    180182  for ( int i = 0; i < this->getFragments(); i++)
    181183  {
    182184    pj  = new Spike();
    183     if (pj == NULL)
    184       return;
    185 
     185    assert( pj );
     186/*    printf(" %i", i);*/
    186187    pj->setParent(PNode::getNullParent());
    187188
     
    192193    Quaternion q;
    193194    pj->setAbsDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1)));
     195
     196    pj->toList(this->getOMListNumber());
     197
    194198/*
    195199    pj->setAbsCoor(this->getAbsCoor() + VECTOR_RAND(3));
     
    197201    pj->activate();
    198202  }
     203/*  printf( "BOOM\n" );*/
    199204}
    200205
     
    250255{
    251256  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
    252   Vector v = this->velocity * dt;
     257  Vector v = this->getVelocity() * dt;
    253258  this->shiftCoor(v);
    254259
    255   if(this->lifeCycle > .9){
    256 //     printf("called by spikeball  ");
    257 //     this->weaponMan->fire();
     260//   if(this->lifeCycle > .9){
     261// /*    printf("time to blow:  ");*/
     262// //     this->weaponMan->fire();
     263// /*    this->blow();*/
     264//   }
     265
     266  if (this->tickLifeCycle(dt)){
    258267    this->blow();
    259   }
    260 
    261   if (this->tickLifeCycle(dt))
    262       this->deactivate();
     268    this->deactivate();
     269  }
    263270
    264271  this->updateAngle( dt );
  • branches/playability/src/world_entities/projectiles/spike_ball.h

    r10256 r10260  
    4141    virtual void draw () const;
    4242
     43//     inline void setVelocity(Vector velocity) { this->velocity = velocity; }
     44
    4345//     inline Vector getRotationVector() { return this->rotationVector; }
    4446//     inline float getAngle() { return this->angle; }
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10252 r10260  
    207207
    208208  this->weaponMan.changeWeaponConfig(3);
    209   this->secWeaponMan.changeWeaponConfig(2);
     209  this->secWeaponMan.changeWeaponConfig(1);
    210210
    211211  curWeaponPrimary    = 3;
    212   curWeaponSecondary  = 2;
     212  curWeaponSecondary  = 1;
    213213
    214214  Playable::weaponConfigChanged();
  • branches/playability/src/world_entities/weapons/heavy_blaster.cc

    r10188 r10260  
    4747  }
    4848
    49   this->deconstr();
     49//   this->deconstr();
    5050     // model will be deleted from WorldEntity-destructor
    5151}
  • branches/playability/src/world_entities/weapons/spike_thrower.cc

    r10256 r10260  
    156156  pj->setParent(PNode::getNullParent());
    157157
    158   pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*150);
     158//   pj->setVelocity(this->getParent()->getAbsDir().apply(Vector(1,0,0))*200 + this->getParent()->getParent()->getVelocity());
     159  pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*160);
     160
    159161  pj->setAbsCoor(this->getEmissionPoint());
    160   pj->toList(this->getOMListNumber());
    161 
    162162  pj->setAbsDir(this->getAbsDir());
    163163  pj->activate();
Note: See TracChangeset for help on using the changeset viewer.