Changeset 9998 in orxonox.OLD for branches/playability
- Timestamp:
- Dec 3, 2006, 7:40:07 PM (18 years ago)
- Location:
- branches/playability
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/ChangeLog
r9979 r9998 1 2006-12-03 Marc Schärer <marcscha@ee.ethz.ch> 2 Added functionality to show / hide a crosshair to the weapon manager. No default crosshair anymore 3 Multiple weapons per ship added 4 Several small tweaks needed to make the above working added 5 6 1 7 2006-11-29 Nicolas Schlumbgerger <nicolasc@ee.ethz.ch> 2 8 Added bolt projectile for light blaster, copied of laser -
branches/playability/src/world_entities/WorldEntities.am
r9979 r9998 42 42 \ 43 43 world_entities/projectiles/bolt.cc \ 44 world_entities/projectiles/mbolt.cc \ 44 45 world_entities/projectiles/hbolt.cc \ 45 46 world_entities/projectiles/bomb.cc \ … … 150 151 weapons/heavy_blaster.h \ 151 152 \ 153 projectiles/bolt.h \ 154 projectiles/mbolt.h \ 155 projectiles/hbolt.h \ 152 156 projectiles/bomb.h \ 153 157 projectiles/laser.h \ -
branches/playability/src/world_entities/projectiles/bolt.cc
r9979 r9998 43 43 this->loadModel("models/projectiles/bolt.obj"); //!< Model not yet in repo 44 44 45 this->setMinEnergy(1 0);45 this->setMinEnergy(1); 46 46 this->setHealthMax(0); 47 47 this->lifeSpan = 5.0; … … 90 90 } 91 91 92 this->setDamage( 20);92 this->setDamage(5); 93 93 this->setHealth(0); 94 94 } -
branches/playability/src/world_entities/projectiles/hbolt.cc
r9991 r9998 41 41 this->loadModel("models/projectiles/hbolt.obj"); 42 42 43 this->setMinEnergy( 10);43 this->setMinEnergy(20); 44 44 this->setHealthMax(0); 45 45 this->lifeSpan = 5.0; … … 91 91 } 92 92 93 this->setDamage( 20);93 this->setDamage(100); 94 94 this->setHealth(0); 95 95 } -
branches/playability/src/world_entities/space_ships/space_ship.cc
r9996 r9998 127 127 void SpaceShip::init() 128 128 { 129 129 130 // this->setRelDir(Quaternion(M_PI, Vector(1,0,0))); 130 131 this->registerObject(this, SpaceShip::_objectList); … … 132 133 PRINTF(4)("SPACESHIP INIT\n"); 133 134 135 secWeaponMan.showCrosshair(); 136 134 137 //weapons: 138 135 139 Weapon* wpRight1 = new LightBlaster (); 136 140 wpRight1->setName("Light Blaster Right"); … … 139 143 140 144 Weapon* wpRight2 = new MediumBlaster (); 141 wpRight2->setName(" LightBlaster Right");145 wpRight2->setName("Medium Blaster Right"); 142 146 Weapon* wpLeft2 = new MediumBlaster (); 143 147 wpLeft2->setName("Medium Blaster Left"); … … 158 162 this->weaponMan.addWeapon( wpLeft3, 0, 4); 159 163 this->weaponMan.addWeapon( wpRight3, 0, 5); 164 160 165 this->secWeaponMan.addWeapon( cannon, 0, 0); 161 166 … … 168 173 wpRight3->requestAction(WA_ACTIVATE); 169 174 wpLeft3->requestAction(WA_ACTIVATE); 175 170 176 cannon->requestAction(WA_ACTIVATE); 171 177 … … 294 300 this->weaponMan.getFixedTarget()->setParent(this); 295 301 this->weaponMan.getFixedTarget()->setRelCoor(100000,0,0); 296 302 297 303 this->secWeaponMan.getFixedTarget()->setParent(this); 298 304 this->secWeaponMan.getFixedTarget()->setRelCoor(100000,0,0); -
branches/playability/src/world_entities/weapons/heavy_blaster.cc
r9979 r9998 51 51 52 52 53 this->setStateDuration(WS_SHOOTING, 0.5); 53 this->setStateDuration(WS_SHOOTING, 0.5); // 2 Schuss pro Sekunde 54 54 this->setStateDuration(WS_RELOADING, 0); 55 55 this->setStateDuration(WS_ACTIVATING, .5); 56 56 this->setStateDuration(WS_DEACTIVATING, 1); 57 57 58 this->setEnergyMax(500 0);59 this->increaseEnergy(500 0);58 this->setEnergyMax(500); 59 this->increaseEnergy(500); 60 60 //this->minCharge = 2; 61 61 … … 66 66 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT); 67 67 this->setProjectileTypeC("HBolt"); // FIXME temp project type until the blaste class exist 68 this->prepareProjectiles( 100);68 this->prepareProjectiles(5); 69 69 70 70 Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this); -
branches/playability/src/world_entities/weapons/heavy_blaster.h
r9975 r9998 8 8 * @author Marc Schaerer <marcscha@ee.ethz.ch> 9 9 * 10 * LightBlaster class10 * Heavy Blaster class 11 11 */ 12 12 class HeavyBlaster : public Weapon -
branches/playability/src/world_entities/weapons/light_blaster.cc
r9978 r9998 44 44 void LightBlaster::init() 45 45 { 46 //this->registerObject(this, LightBlaster::_objectList);47 48 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);49 46 50 47 this->loadModel("models/guns/plasmadriver_#.obj", 1.0); 51 48 52 49 53 this->setStateDuration(WS_SHOOTING, 0.05); 50 this->setStateDuration(WS_SHOOTING, 0.05); // 20 Schuss pro Sekunde 54 51 this->setStateDuration(WS_RELOADING, 0); 55 52 this->setStateDuration(WS_ACTIVATING, .5); 56 53 this->setStateDuration(WS_DEACTIVATING, 1); 57 54 58 this->setEnergyMax(500 0);59 this->increaseEnergy(500 0);55 this->setEnergyMax(500); 56 this->increaseEnergy(500); 60 57 //this->minCharge = 2; 61 58 -
branches/playability/src/world_entities/weapons/medium_blaster.cc
r9996 r9998 51 51 52 52 53 this->setStateDuration(WS_SHOOTING, 0.2); 53 this->setStateDuration(WS_SHOOTING, 0.1); // 10 Schuss pro Sekunde 54 54 55 this->setStateDuration(WS_RELOADING, 0); 55 56 this->setStateDuration(WS_ACTIVATING, .5); 56 57 this->setStateDuration(WS_DEACTIVATING, 1); 57 58 58 this->setEnergyMax(500 0);59 this->increaseEnergy(500 0);59 this->setEnergyMax(500); 60 this->increaseEnergy(500); 60 61 //this->minCharge = 2; 61 62 … … 65 66 66 67 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_LIGHT); 67 this->setProjectileTypeC(" RailProjectile"); // FIXME temp project type until the blaste class exist68 this->prepareProjectiles( 100);68 this->setProjectileTypeC("MBolt"); // FIXME temp project type until the blaste class exist 69 this->prepareProjectiles(20); 69 70 70 71 Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this); -
branches/playability/src/world_entities/weapons/medium_blaster.h
r9975 r9998 8 8 * @author Marc Schaerer <marcscha@ee.ethz.ch> 9 9 * 10 * LightBlaster class10 * Medium Blaster class 11 11 */ 12 12 class MediumBlaster : public Weapon -
branches/playability/src/world_entities/weapons/weapon.cc
r9966 r9998 541 541 unlikely(this->energy + this->ammoContainer->getStoredEnergy() < this->minCharge)) 542 542 { 543 this->requestAction(WA_DEACTIVATE);543 //this->requestAction(WA_DEACTIVATE); 544 544 this->execute(); 545 545 return false; -
branches/playability/src/world_entities/weapons/weapon_manager.cc
r9996 r9998 103 103 104 104 this->currentConfigID = 0; 105 this->slotCount = 6;105 this->slotCount = WM_MAX_SLOTS; 106 106 //this->weaponChange; 107 107 … … 114 114 this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR); 115 115 this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR); 116 117 this->hideCrosshair(); 118 } 119 120 void WeaponManager::showCrosshair() 121 { 122 this->crosshair->setVisibility( true); 123 } 124 125 void WeaponManager::hideCrosshair() 126 { 127 this->crosshair->setVisibility( false); 116 128 } 117 129 … … 300 312 if (this->parentEntity->isA(Playable::staticClassID())) 301 313 dynamic_cast<Playable*>(this->parentEntity)->weaponConfigChanged(); 314 302 315 weapon->setDefaultTarget(this->crosshair); 303 316 } … … 416 429 if( firingWeapon != NULL) firingWeapon->requestAction(WA_SHOOT); 417 430 } 418 this->crosshair->setRotationSpeed(500); 419 this->crossHairSizeAnim->replay(); 431 432 /* 433 if( this->crosshair != NULL) 434 { 435 this->crosshair->setRotationSpeed(500); 436 this->crossHairSizeAnim->replay(); 437 } */ 420 438 } 421 439 -
branches/playability/src/world_entities/weapons/weapon_manager.h
r9965 r9998 59 59 virtual void loadParams(const TiXmlElement* root); 60 60 void loadWeapons(const TiXmlElement* root); 61 62 void showCrosshair(); 63 void hideCrosshair(); 61 64 62 65 void setSlotCount(unsigned int slotCount);
Note: See TracChangeset
for help on using the changeset viewer.