Changeset 7001 in orxonox.OLD for trunk/src/world_entities/space_ships/space_ship.cc
- Timestamp:
- Feb 3, 2006, 2:18:26 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/space_ship.cc
r6997 r7001 287 287 Playable::collidesWith(entity, location); 288 288 289 290 if (entity->isA(CL_TURRET_POWER_UP) && entity != ref)291 {292 this->ADDWEAPON();293 ref = entity;294 }295 296 289 if( entity->isA(CL_PROJECTILE) && entity != ref) 297 290 { … … 501 494 } 502 495 503 #include "weapons/aiming_turret.h"504 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG505 void SpaceShip::ADDWEAPON()506 {507 Weapon* turret = NULL;508 509 if ((float)rand()/RAND_MAX < .9)510 {511 //if (this->getWeaponManager()->hasFreeSlot(2, WTYPE_TURRET))512 {513 turret = new Turret();514 this->addWeapon(turret, 2);515 this->getWeaponManager()->changeWeaponConfig(2);516 }517 }518 else519 {520 //if (this->getWeaponManager()->hasFreeSlot(3))521 {522 turret = dynamic_cast<Weapon*>(Factory::fabricate(CL_TARGETING_TURRET));523 if (turret != NULL)524 this->addWeapon(turret, 3);525 526 this->getWeaponManager()->changeWeaponConfig(3);527 }528 }529 530 if(turret != NULL)531 {532 turret->setName("Turret");533 turret->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1);534 }535 }536 496 537 497 #define MASK_bUp 1
Note: See TracChangeset
for help on using the changeset viewer.