Changeset 10224 in orxonox.OLD for branches/playability/src/world_entities/weapons
- Timestamp:
- Jan 10, 2007, 5:33:19 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/weapons
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/weapons/spike_launcher.cc
r10217 r10224 219 219 float x, y, z; 220 220 for (int i = 0; i < this->spikes;i++){ 221 221 printf("%i ", i); 222 222 x = m[0][0] * this->launcher[i].x + m[0][1] * this->launcher[i].y + m[0][2] * this->launcher[i].z; 223 223 y = m[1][0] * this->launcher[i].x + m[1][1] * this->launcher[i].y + m[1][2] * this->launcher[i].z; … … 229 229 this->launcher[i] = Vector (x, y, z); 230 230 } 231 printf("\n"); 231 232 232 233 for( int i = 0; i < 3 ; i++) … … 241 242 updateFireDir(VECTOR_RAND(1), 20); 242 243 243 printf("fir eing spikes\n");244 printf("firing spikes\n"); 244 245 Projectile* pj = NULL; 245 246 for (int i = 0; i < this->spikes; i++) … … 250 251 251 252 // pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10))); 252 pj->setVelocity(this->launcher[i] * 300.0);253 pj->setVelocity(this->launcher[i].getNormalized() * 300.0); 253 254 254 255 pj->setParent(PNode::getNullParent()); 255 256 pj->setAbsCoor(this->getAbsCoor() + this->launcher[i] * this->size); 256 //Quaternion q;257 //pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1)));258 pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z);259 260 pj->toList(this->getOMListNumber()); 257 Quaternion q; 258 pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1))); 259 // pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z); 260 261 /* pj->toList(this->getOMListNumber());*/ 261 262 pj->activate(); 262 263 } -
branches/playability/src/world_entities/weapons/spike_thrower.cc
r10196 r10224 157 157 pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*150); 158 158 pj->setAbsCoor(this->getEmissionPoint()); 159 pj->toList(this->getOMListNumber()); 159 160 160 161 pj->setAbsDir(this->getAbsDir()); -
branches/playability/src/world_entities/weapons/weapon_manager.cc
r10132 r10224 431 431 void WeaponManager::fire() 432 432 { 433 printf("firing WM: "); 433 434 Weapon* firingWeapon; 434 435 for(int i = 0; i < this->slotCount; i++) 435 436 { 437 printf("%i ", i); 436 438 firingWeapon = this->currentSlotConfig[i].currentWeapon; 437 439 if( firingWeapon != NULL && firingWeapon->getCurrentState() == WS_SHOOTING) continue; 438 440 if( firingWeapon != NULL) firingWeapon->requestAction(WA_SHOOT); 439 441 } 440 442 printf("\n"); 441 443 /* 442 444 this->crosshair->setRotationSpeed(500);
Note: See TracChangeset
for help on using the changeset viewer.