Changeset 10698 in orxonox.OLD for trunk/src/world_entities/projectiles
- Timestamp:
- Jun 14, 2007, 5:33:43 PM (18 years ago)
- Location:
- trunk/src/world_entities/projectiles
- Files:
-
- 9 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/projectiles/acid_splash.cc
r10511 r10698 116 116 this->toList(OM_NULL); 117 117 //this->toList(OM_DEAD); 118 this->removeNode();119 118 // this->removeNode(); 119 120 120 AcidSplash::fastFactory->kill(this); 121 121 } -
trunk/src/world_entities/projectiles/hbolt.cc
r10618 r10698 46 46 this->setMinEnergy(10); 47 47 this->setHealthMax(0); 48 this->lifeSpan = 2.0;48 this->lifeSpan = 3.0; 49 49 50 50 this->angle = 0; … … 116 116 117 117 this->toList(OM_DEAD); 118 this->removeNode();118 // this->removeNode(); 119 119 HBolt::fastFactory->kill(this); 120 120 … … 177 177 glPushAttrib(GL_ENABLE_BIT); 178 178 glDisable(GL_LIGHTING); 179 //glDisable(GL_FOG);179 glDisable(GL_FOG); 180 180 181 181 glMatrixMode(GL_MODELVIEW); … … 184 184 // float matrix[4][4]; 185 185 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 186 this->halo->draw(); 187 186 188 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 187 189 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); … … 189 191 // glMultMatrixf((float*)matrix); 190 192 this->getModel()->draw(); 191 this->halo->draw();192 193 193 194 glPopMatrix(); -
trunk/src/world_entities/projectiles/laser.cc
r10114 r10698 100 100 101 101 this->toList(OM_NULL); 102 this->removeNode();102 // this->removeNode(); 103 103 Laser::fastFactory->kill(this); 104 104 } -
trunk/src/world_entities/projectiles/lbolt.cc
r10618 r10698 62 62 this->halo = new Billboard(); 63 63 this->halo->setSize(.35, .35); 64 this->halo->setTexture("hbolt_halo. png");64 this->halo->setTexture("hbolt_halo.jpg"); 65 65 this->halo->setVisibility(false); 66 66 67 this->halo->setPulse(); 67 68 68 69 } … … 120 121 121 122 this->toList(OM_DEAD); 122 this->removeNode();123 // this->removeNode(); 123 124 LBolt::fastFactory->kill(this); 124 125 } … … 148 149 149 150 angle += LBolt::rotationSpeed * dt; 151 if(angle > 360) 152 angle -= 360; 150 153 151 154 for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++) … … 183 186 float matrix[4][4]; 184 187 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 185 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 188 this->halo->draw(); 189 190 Vector tmpRot; 191 tmpRot = this->flightDirection.getNormalized(); 192 glRotatef(this->angle, tmpRot.x, tmpRot.y, tmpRot.z); 193 tmpRot = this->getAbsDir().getSpacialAxis(); 186 194 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 187 glRotatef(this->angle, 1.0, 0.0, 0.0); 195 188 196 this->getAbsDir().matrix (matrix); 189 197 glMultMatrixf((float*)matrix); 190 198 this->getModel()->draw(); 191 199 192 this->halo->draw();193 194 200 glPopMatrix(); 195 201 glPopAttrib(); -
trunk/src/world_entities/projectiles/mbolt.cc
r10618 r10698 145 145 this->toList(OM_NULL); 146 146 //this->toList(OM_DEAD); 147 this->removeNode();147 // this->removeNode(); 148 148 MBolt::fastFactory->kill(this); 149 149 } … … 212 212 float matrix[4][4]; 213 213 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 214 glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile 214 // glRotatef(this->angle, 1.0f, 0.0f, 0.0f); //spinning missile 215 glRotatef(this->angle, this->flightDirection.x, this->flightDirection.y, this->flightDirection.z); 215 216 this->getAbsDir().matrix (matrix); 216 217 glMultMatrixf((float*)matrix); -
trunk/src/world_entities/projectiles/rail_projectile.cc
r10114 r10698 99 99 100 100 this->toList(OM_NULL); 101 this->removeNode();101 // this->removeNode(); 102 102 RailProjectile::fastFactory->kill(this); 103 103 } -
trunk/src/world_entities/projectiles/spike.cc
r10368 r10698 111 111 112 112 this->toList(OM_NULL); 113 this->removeNode();113 // this->removeNode(); 114 114 Spike::fastFactory->kill(this); 115 115 } -
trunk/src/world_entities/projectiles/spike_ball.cc
r10511 r10698 149 149 150 150 this->toList(OM_NULL); 151 this->removeNode();151 // this->removeNode(); 152 152 SpikeBall::fastFactory->kill(this); 153 153 } -
trunk/src/world_entities/projectiles/swarm_projectile.cc
r10618 r10698 134 134 135 135 this->toList(OM_DEAD); 136 this->removeNode();136 // this->removeNode(); 137 137 SwarmProjectile::fastFactory->kill(this); 138 138 } … … 200 200 this->deactivate(); 201 201 202 203 204 202 /** old guiding function*/ 205 206 float projectileVelocity = this->getVelocity().len(); 203 static float projectileVelocity = this->getVelocity().len(); 207 204 if (target != NULL){ 208 205 Vector estTargetDir = (this->target->getAbsCoor() - this->getAbsCoor()).getNormalized(); … … 225 222 226 223 this->angle += this->rotationSpeed * time; 227 228 while (this->angle > 360) 229 { 230 this->angle -= 360; 231 } 224 while (this->angle > 360) { this->angle -= 360; } 232 225 233 226 this->lastDir = this->curDir; … … 240 233 PRINTF(0)("Target was hit by Swarm Missile!\n"); 241 234 } 242 elseif( this->target == NULL)235 if( this->target == NULL) 243 236 this->deactivate(); 244 237 }
Note: See TracChangeset
for help on using the changeset viewer.