Changeset 10702 in orxonox.OLD for branches/presentation/src/world_entities/weapons/disruptor.cc
- Timestamp:
- Jun 14, 2007, 11:23:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/disruptor.cc
r10698 r10702 38 38 : Weapon() 39 39 { 40 // this->registerObject(this, Disruptor::_objectList);41 42 40 this->init(); 43 41 } … … 46 44 : Weapon() 47 45 { 48 // this->registerObject(this, Disruptor::_objectList);49 50 46 // TODO add leftRight to params 51 47 this->init(); … … 68 64 delete [] this->shootAnim; 69 65 delete [] this->objComp; 70 /* 71 for(int j = 0; j < this->getSegs(); j++) 72 { 73 delete this->shootAnim[i][j]; 74 delete this->objComp[i][j]; 75 } 76 delete this->shootAnim[i]; 77 delete this->objComp[i]; 78 delete this->emissionPoint[i]; 79 }*/ 80 81 // this->deconstr(); 82 // model will be deleted from WorldEntity-destructor 66 83 67 } 84 68 … … 198 182 void Disruptor::draw() const 199 183 { 200 glMatrixMode(GL_MODELVIEW);201 184 glPushMatrix(); 202 glTranslatef (this->getAbsCoor ().x, 203 this->getAbsCoor ().y, 204 this->getAbsCoor ().z); 205 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 206 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 207 208 //Base 209 static_cast<StaticModel*>(this->getModel())->draw(1); 210 211 // Barrel glPushMatrix(); 212 glTranslatef 213 (this->objComp[0][0]->getAbsCoor().x, this->objComp[0][0]->getAbsCoor().y, this->objComp[0][0]->getAbsCoor().z); 214 static_cast<StaticModel*>(this->getModel())->draw(0); 185 glMatrixMode(GL_MODELVIEW); 186 glTranslatef (this->getAbsCoor ().x, 187 this->getAbsCoor ().y, 188 this->getAbsCoor ().z); 189 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 190 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 191 192 //Base 193 static_cast<StaticModel*>(this->getModel())->draw(1); 194 195 // Barrel 196 glPushMatrix(); 197 glTranslatef(this->objComp[0][0]->getAbsCoor().x, this->objComp[0][0]->getAbsCoor().y, this->objComp[0][0]->getAbsCoor().z); 198 static_cast<StaticModel*>(this->getModel())->draw(0); 199 glPopMatrix(); 215 200 glPopMatrix(); 216 201 }
Note: See TracChangeset
for help on using the changeset viewer.