Changeset 10702 in orxonox.OLD for branches/presentation/src/world_entities/weapons/rf_cannon.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/rf_cannon.cc
r10701 r10702 126 126 void RFCannon::fire() 127 127 { 128 // for (int i = 0; i < this->getBarrels(); i++){ 129 Projectile* pj = this->getProjectile(); 130 if (pj == NULL) 131 return; 128 Projectile* pj = this->getProjectile(); 129 if (pj == NULL) 130 return; 132 131 133 134 132 // set the owner 133 pj->setOwner(this->getOwner()); 135 134 136 135 pj->setParent(PNode::getNullParent()); 137 136 138 137 pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190); 139 138 140 141 142 139 pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor()); 140 pj->setAbsDir(this->getAbsDir()); 141 pj->activate(); 143 142 144 this->activeBarrel = (this->activeBarrel + 1) % this->getBarrels(); 145 // } 143 this->activeBarrel = (this->activeBarrel + 1) % this->getBarrels(); 146 144 } 147 145 … … 162 160 void RFCannon::draw() const 163 161 { 164 glMatrixMode(GL_MODELVIEW);165 162 glPushMatrix(); 163 glMatrixMode(GL_MODELVIEW); 166 164 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 167 165 Vector tmpRot = this->getAbsDir().getSpacialAxis();
Note: See TracChangeset
for help on using the changeset viewer.