Changeset 10260 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Jan 17, 2007, 4:00:23 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/spike.cc
r10196 r10260 140 140 141 141 angle += rotationSpeed * dt; 142 143 /* printf( "spike tick\n" );*/ 142 144 } 143 145 -
branches/playability/src/world_entities/projectiles/spike_ball.cc
r10256 r10260 68 68 69 69 this->size = 4; 70 71 this->launcher = new Vector [this->getFragments()]; 72 70 73 // this->fastFactory = tFastFactory<Spike>::getFastFactory(CL_SPIKE, "Spike"); 71 74 … … 120 123 SpikeBall::explosionParticles->setColor(1.0, .8,.8,.7,.0); 121 124 } 122 123 125 this->setDamage(5); 124 126 this->setHealth(0); … … 177 179 { 178 180 Spike* pj = NULL; 179 181 /* printf( "KA-" );*/ 180 182 for ( int i = 0; i < this->getFragments(); i++) 181 183 { 182 184 pj = new Spike(); 183 if (pj == NULL) 184 return; 185 185 assert( pj ); 186 /* printf(" %i", i);*/ 186 187 pj->setParent(PNode::getNullParent()); 187 188 … … 192 193 Quaternion q; 193 194 pj->setAbsDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1))); 195 196 pj->toList(this->getOMListNumber()); 197 194 198 /* 195 199 pj->setAbsCoor(this->getAbsCoor() + VECTOR_RAND(3)); … … 197 201 pj->activate(); 198 202 } 203 /* printf( "BOOM\n" );*/ 199 204 } 200 205 … … 250 255 { 251 256 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); 252 Vector v = this-> velocity* dt;257 Vector v = this->getVelocity() * dt; 253 258 this->shiftCoor(v); 254 259 255 if(this->lifeCycle > .9){ 256 // printf("called by spikeball "); 257 // this->weaponMan->fire(); 260 // if(this->lifeCycle > .9){ 261 // /* printf("time to blow: ");*/ 262 // // this->weaponMan->fire(); 263 // /* this->blow();*/ 264 // } 265 266 if (this->tickLifeCycle(dt)){ 258 267 this->blow(); 259 } 260 261 if (this->tickLifeCycle(dt)) 262 this->deactivate(); 268 this->deactivate(); 269 } 263 270 264 271 this->updateAngle( dt ); -
branches/playability/src/world_entities/projectiles/spike_ball.h
r10256 r10260 41 41 virtual void draw () const; 42 42 43 // inline void setVelocity(Vector velocity) { this->velocity = velocity; } 44 43 45 // inline Vector getRotationVector() { return this->rotationVector; } 44 46 // inline float getAngle() { return this->angle; } -
branches/playability/src/world_entities/space_ships/space_ship.cc
r10252 r10260 207 207 208 208 this->weaponMan.changeWeaponConfig(3); 209 this->secWeaponMan.changeWeaponConfig( 2);209 this->secWeaponMan.changeWeaponConfig(1); 210 210 211 211 curWeaponPrimary = 3; 212 curWeaponSecondary = 2;212 curWeaponSecondary = 1; 213 213 214 214 Playable::weaponConfigChanged(); -
branches/playability/src/world_entities/weapons/heavy_blaster.cc
r10188 r10260 47 47 } 48 48 49 this->deconstr();49 // this->deconstr(); 50 50 // model will be deleted from WorldEntity-destructor 51 51 } -
branches/playability/src/world_entities/weapons/spike_thrower.cc
r10256 r10260 156 156 pj->setParent(PNode::getNullParent()); 157 157 158 pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*150); 158 // pj->setVelocity(this->getParent()->getAbsDir().apply(Vector(1,0,0))*200 + this->getParent()->getParent()->getVelocity()); 159 pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*160); 160 159 161 pj->setAbsCoor(this->getEmissionPoint()); 160 pj->toList(this->getOMListNumber());161 162 162 pj->setAbsDir(this->getAbsDir()); 163 163 pj->activate();
Note: See TracChangeset
for help on using the changeset viewer.