Changeset 6805 in orxonox.OLD for trunk/src/world_entities/space_ships/helicopter.cc
- Timestamp:
- Jan 28, 2006, 12:20:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/space_ships/helicopter.cc
r6804 r6805 259 259 void Helicopter::collidesWith(WorldEntity* entity, const Vector& location) 260 260 { 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);266 261 } 267 262 … … 468 463 469 464 glPopMatrix (); 470 471 this->getWeaponManager()->draw();472 465 } 473 466 … … 515 508 } 516 509 } 517 518 #include "weapons/aiming_turret.h"519 // FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG520 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 else534 {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.