Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 3, 2006, 2:18:26 AM (20 years ago)
Author:
bensch
Message:

TurbineHover is cool now :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/space_ship.cc

    r6997 r7001  
    287287  Playable::collidesWith(entity, location);
    288288
    289 
    290   if (entity->isA(CL_TURRET_POWER_UP) && entity != ref)
    291   {
    292     this->ADDWEAPON();
    293     ref = entity;
    294   }
    295 
    296289  if( entity->isA(CL_PROJECTILE) && entity != ref)
    297290  {
     
    501494}
    502495
    503 #include "weapons/aiming_turret.h"
    504 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
    505 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   else
    519   {
    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 }
    536496
    537497#define MASK_bUp         1
Note: See TracChangeset for help on using the changeset viewer.