Changeset 10618 in orxonox.OLD for trunk/src/world_entities/weapons/light_blaster.cc
- Timestamp:
- Apr 4, 2007, 12:13:53 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 16 16 OrxonoxPlayability.kdevses 17 17 OrxonoxPlayability.kdevelop.pcs 18 orxonox.backtrace 19 orxonox.kdevses 20 orxonox.kdevelop.pcs
-
- Property svn:ignore
-
trunk/src/world_entities/weapons/light_blaster.cc
r10539 r10618 1 /* 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004-2006 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 ### File Specific 12 main-programmer: Marc Schaerrer, Nicolas Schlumberger 13 co-programmer: 14 15 */ 16 1 17 #include "light_blaster.h" 2 18 #include "world_entities/projectiles/projectile.h" … … 39 55 for (int i = 0; i < this->getBarrels(); i++) 40 56 { 41 delete [] this->shootAnim[i];57 //delete [] this->shootAnim[i]; 42 58 delete [] this->objComp[i]; 43 59 } 44 60 delete [] this->emissionPoint; 45 delete [] this->shootAnim;61 //delete [] this->shootAnim; 46 62 delete [] this->objComp; 47 63 … … 82 98 this->objComp = new PNode**[this->getBarrels()]; 83 99 this->emissionPoint = new PNode*[this->getBarrels()]; 84 this->shootAnim = new Animation3D**[this->getBarrels()];100 // this->shootAnim = new Animation3D**[this->getBarrels()]; 85 101 for (int i = 0; i < this->getBarrels(); i++) 86 102 { 87 103 this->objComp[i] = new PNode* [this->getSegs()]; 88 104 this->emissionPoint[i] = new PNode; 89 this->emissionPoint[i]->setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles105 this->emissionPoint[i]->setParent(this); 90 106 this->emissionPoint[i]->setName("EmissionPoint"); 91 107 this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 92 this->shootAnim[i] = new Animation3D* [this->getSegs()];108 // this->shootAnim[i] = new Animation3D* [this->getSegs()]; 93 109 for(int j = 0; j < this->getSegs(); j++) 94 110 { 95 111 this->objComp[i][j] = new PNode; 96 this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);97 this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);112 // this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]); 113 // this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT); 98 114 } 99 115 } 100 101 for (int i = 0; i < this->getBarrels(); i++ ) 102 this->emissionPoint[i]->setRelCoor(Vector(1.19, 0.0, 0.1)); 116 /* 117 this->emissionPoint[0]->setRelCoor(Vector(1.19, 0.0, 0.1)); 118 this->emissionPoint[1]->setRelCoor(Vector(1.19, -0.07, -0.05)); 119 this->emissionPoint[2]->setRelCoor(Vector(1.19, 0.07, -0.05));*/ 120 121 this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1)); 122 this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05)); 123 this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05)); 103 124 104 125 // Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this); … … 112 133 // this->setEmissionPoint(3.8, 1.2, 0); 113 134 114 for (int i = 0; i < this->getBarrels(); i++){115 this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);116 this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);117 }135 // for (int i = 0; i < this->getBarrels(); i++){ 136 // this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR); 137 // this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR); 138 // } 118 139 119 140 … … 144 165 pj->activate(); 145 166 146 for (int i = 0; i < this->getSegs(); i++)147 this->shootAnim[this->activeBarrel][i]->replay();167 // for (int i = 0; i < this->getSegs(); i++) 168 // this->shootAnim[this->activeBarrel][i]->replay(); 148 169 149 170 // switch barrel
Note: See TracChangeset
for help on using the changeset viewer.