Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 28, 2006, 12:20:58 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: hover works as it should

File:
1 edited

Legend:

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

    r6804 r6805  
    259259void Helicopter::collidesWith(WorldEntity* entity, const Vector& location)
    260260{
    261   if (entity->isA(CL_TURRET_POWER_UP))
    262   {
    263     this->ADDWEAPON();
    264     }
    265 //  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
    266261}
    267262
     
    468463
    469464    glPopMatrix ();
    470 
    471   this->getWeaponManager()->draw();
    472465}
    473466
     
    515508    }
    516509}
    517 
    518 #include "weapons/aiming_turret.h"
    519 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
    520 void Helicopter::ADDWEAPON()
    521 {
    522   Weapon* turret = NULL;
    523 
    524   if ((float)rand()/RAND_MAX < .1)
    525   {
    526     //if (this->getWeaponManager()->hasFreeSlot(2, WTYPE_TURRET))
    527     {
    528       turret = new Turret();
    529       this->addWeapon(turret, 2);
    530       this->getWeaponManager()->changeWeaponConfig(2);
    531     }
    532   }
    533   else
    534   {
    535     //if (this->getWeaponManager()->hasFreeSlot(3))
    536     {
    537       turret = new AimingTurret();
    538       this->addWeapon(turret, 3);
    539 
    540       this->getWeaponManager()->changeWeaponConfig(3);
    541     }
    542   }
    543 
    544   if(turret != NULL)
    545   {
    546     turret->setName("Turret");
    547     turret->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1);
    548   }
    549 }
Note: See TracChangeset for help on using the changeset viewer.