Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 14, 2007, 5:33:43 PM (17 years ago)
Author:
snellen
Message:

merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/medium_blaster.cc

    r10618 r10698  
    6969void MediumBlaster::init()
    7070{
    71   this->loadModel("models/guns/blaster.obj", .33);
     71  this->setScaling(.3333);
     72
     73  this->loadModel("models/guns/blaster.obj", this->getScaling());
    7274
    7375  this->setStateDuration(WS_SHOOTING, 0.2);   // 5 Schuss pro Sekunde
     
    8284
    8385  this->setActionSound(WA_SHOOT, "sounds/guns/laser.wav");
    84   this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");
     86//   this->setActionSound(WA_ACTIVATE, "sounds/voices/lasers.wav");
    8587  this->setActionSound(WA_RELOAD, "sounds/spawn/alien_generator.wav");
    8688
    8789  this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    88   this->setProjectileTypeC("MBolt");   // FIXME temp project type until the blaste class exist
    89   this->prepareProjectiles(100);
     90  this->setProjectileTypeC("MBolt");
     91  this->prepareProjectiles(10);
    9092
    9193
     
    9597
    9698  this->objComp = new PNode**[this->getBarrels()];
     99  this->emissionPoint = new PNode*[this->getBarrels()];
    97100  this->shootAnim = new Animation3D**[this->getBarrels()];
    98101  for (int i = 0; i < this->getBarrels(); i++)
    99102  {
    100103    this->objComp[i] = new PNode* [this->getSegs()];
     104    this->emissionPoint[i] = new PNode;
     105    this->emissionPoint[i]->setParent(this);  //Parenting emissionPoint to Weapon
     106    this->emissionPoint[i]->setName("EmissionPoint");
     107    this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
    101108    this->shootAnim[i] = new Animation3D* [this->getSegs()];
    102109    for(int j = 0; j < this->getSegs(); j++)
     
    109116
    110117  for (int i = 0; i < this->getBarrels(); i++){
    111     this->shootAnim[i][0]->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.04, ANIM_LINEAR, ANIM_NULL);
    112     this->shootAnim[i][0]->addKeyFrame(Vector(-0.333, 0.0, 0.0), Quaternion(), 0.15, ANIM_LINEAR, ANIM_NULL);
    113     this->shootAnim[i][0]->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.01, ANIM_LINEAR, ANIM_NULL);
    114 
    115     this->shootAnim[i][1]->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.04, ANIM_LINEAR, ANIM_NULL);
    116     this->shootAnim[i][1]->addKeyFrame(Vector(.166, 0.0, 0.0), Quaternion(), 0.15, ANIM_LINEAR, ANIM_NULL);
    117     this->shootAnim[i][1]->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.01, ANIM_LINEAR, ANIM_NULL);
     118    this->shootAnim[i][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.04, ANIM_LINEAR, ANIM_NULL);
     119    this->shootAnim[i][0]->addKeyFrame(Vector(-1.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.15, ANIM_LINEAR, ANIM_NULL);
     120    this->shootAnim[i][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.01, ANIM_LINEAR, ANIM_NULL);
     121
     122    this->shootAnim[i][1]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.04, ANIM_LINEAR, ANIM_NULL);
     123    this->shootAnim[i][1]->addKeyFrame(Vector(.5, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.15, ANIM_LINEAR, ANIM_NULL);
     124    this->shootAnim[i][1]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.01, ANIM_LINEAR, ANIM_NULL);
    118125  }
    119126
     
    124131  animation3->setInfinity(ANIM_INF_CONSTANT);
    125132
    126 
    127   this->setEmissionPoint(1.3, 0, 0);
     133  this->emissionPoint[0]->setRelCoor(Vector(3.9, 0.0, 0.0) * this->getScaling());
    128134
    129135  animation2->addKeyFrame(Vector(0.0, -1.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL);
Note: See TracChangeset for help on using the changeset viewer.