Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 6:15:21 PM (18 years ago)
Author:
nicolasc
Message:

working spikeballs

Location:
branches/playability/src/world_entities/weapons
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/heavy_blaster.cc

    r10261 r10271  
    4141  }
    4242  delete [] this->emissionPoint;
    43  
    44    delete [] this->shootAnim;
    45    delete [] this->objComp;
     43  delete [] this->shootAnim;
     44  delete [] this->objComp;
    4645/*
    4746    for(int j = 0; j < this->getSegs(); j++)
  • branches/playability/src/world_entities/weapons/spike_launcher.cc

    r10224 r10271  
    239239void SpikeLauncher::fire()
    240240{
    241   // temporary solution to test the module
    242241  updateFireDir(VECTOR_RAND(1), 20);
    243242
    244   printf("firing spikes\n");
    245243  Projectile* pj = NULL;
    246244  for (int i = 0; i < this->spikes; i++)
     
    250248      return;
    251249
    252 //     pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10)));
    253250    pj->setVelocity(this->launcher[i].getNormalized() * 300.0);
    254251
     
    257254    Quaternion q;
    258255    pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1)));
    259 //     pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z);
    260 
    261 /*    pj->toList(this->getOMListNumber());*/
     256
    262257    pj->activate();
    263258  }
  • branches/playability/src/world_entities/weapons/spike_thrower.cc

    r10260 r10271  
    8282  animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    8383  animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    84   animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);*/
    85 /*
     84  animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     85
    8686  animation1->setInfinity(ANIM_INF_CONSTANT);
    8787  animation2->setInfinity(ANIM_INF_CONSTANT);*/
     
    104104  this->getProjectileFactory()->prepare(50);
    105105
    106 //   this->setActionSound(WA_SHOOT, "sound/explosions/explosion_1.wav");
    107 //   this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");
    108 //   this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");
     106  this->setActionSound(WA_SHOOT, "sound/explosions/explosion_1.wav");
     107  this->setActionSound(WA_ACTIVATE, "sound/vocals/missiles.wav");
     108  this->setActionSound(WA_RELOAD, "sound/vocals/reload.wav");
    109109
    110110}
     
    156156  pj->setParent(PNode::getNullParent());
    157157
    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);
     158  dynamic_cast<SpikeBall*>(pj)->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*110);
    160159
    161160  pj->setAbsCoor(this->getEmissionPoint());
Note: See TracChangeset for help on using the changeset viewer.