Changeset 10698 in orxonox.OLD for trunk/src/world_entities/weapons/medium_blaster.cc
- Timestamp:
- Jun 14, 2007, 5:33:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/medium_blaster.cc
r10618 r10698 69 69 void MediumBlaster::init() 70 70 { 71 this->loadModel("models/guns/blaster.obj", .33); 71 this->setScaling(.3333); 72 73 this->loadModel("models/guns/blaster.obj", this->getScaling()); 72 74 73 75 this->setStateDuration(WS_SHOOTING, 0.2); // 5 Schuss pro Sekunde … … 82 84 83 85 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"); 85 87 this->setActionSound(WA_RELOAD, "sounds/spawn/alien_generator.wav"); 86 88 87 89 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT); 88 this->setProjectileTypeC("MBolt"); // FIXME temp project type until the blaste class exist89 this->prepareProjectiles(10 0);90 this->setProjectileTypeC("MBolt"); 91 this->prepareProjectiles(10); 90 92 91 93 … … 95 97 96 98 this->objComp = new PNode**[this->getBarrels()]; 99 this->emissionPoint = new PNode*[this->getBarrels()]; 97 100 this->shootAnim = new Animation3D**[this->getBarrels()]; 98 101 for (int i = 0; i < this->getBarrels(); i++) 99 102 { 100 103 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); 101 108 this->shootAnim[i] = new Animation3D* [this->getSegs()]; 102 109 for(int j = 0; j < this->getSegs(); j++) … … 109 116 110 117 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); 118 125 } 119 126 … … 124 131 animation3->setInfinity(ANIM_INF_CONSTANT); 125 132 126 127 this->setEmissionPoint(1.3, 0, 0); 133 this->emissionPoint[0]->setRelCoor(Vector(3.9, 0.0, 0.0) * this->getScaling()); 128 134 129 135 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.