Changeset 9970 in orxonox.OLD for branches/playability/src
- Timestamp:
- Nov 29, 2006, 4:22:38 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/Makefile.am
r9869 r9970 6 6 7 7 ## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES 8 libORXwe_a_SOURCES = \ 9 world_entity.cc \ 10 \ 11 camera.cc \ 12 playable.cc \ 13 player.cc \ 14 \ 15 npcs/npc.cc \ 16 \ 17 weapons/weapon_manager.cc \ 18 weapons/crosshair.cc \ 19 weapons/weapon.cc \ 20 weapons/ammo_container.cc \ 21 projectiles/projectile.cc \ 22 \ 23 extendable.cc \ 24 power_ups/power_up.cc \ 25 power_ups/param_power_up.cc \ 26 power_ups/weapon_power_up.cc \ 27 \ 28 spawning_point.cc \ 29 \ 30 \ 31 effects/explosion.cc \ 32 effects/billboard.cc \ 33 \ 34 \ 35 elements/glgui_energywidget.cc 8 libORXwe_a_SOURCES = world_entity.cc camera.cc playable.cc player.cc \ 9 npcs/npc.cc weapons/weapon_manager.cc weapons/crosshair.cc \ 10 weapons/weapon.cc weapons/ammo_container.cc projectiles/projectile.cc \ 11 extendable.cc power_ups/power_up.cc power_ups/param_power_up.cc \ 12 power_ups/weapon_power_up.cc spawning_point.cc effects/explosion.cc effects/billboard.cc \ 13 elements/glgui_energywidget.cc 36 14 37 15 38 noinst_HEADERS = \ 39 world_entity.h \ 40 \ 41 camera.h \ 42 extendable.h \ 43 playable.h \ 44 player.h \ 45 \ 46 npcs/npc.h \ 47 \ 48 weapons/weapon_manager.h \ 49 weapons/crosshair.h \ 50 weapons/weapon.h \ 51 weapons/ammo_container.h \ 52 projectiles/projectile.h \ 53 \ 54 power_ups/power_up.h \ 55 power_ups/param_power_up.h \ 56 power_ups/weapon_power_up.h \ 57 \ 58 spawning_point.h \ 59 \ 60 \ 61 effects/explosion.h \ 62 effects/billboard.h \ 63 \ 64 \ 65 \ 66 elements/glgui_energywidget.h \ 67 \ 68 \ 69 $(WorldEntities_HEADERS_) 16 noinst_HEADERS = world_entity.h camera.h extendable.h playable.h \ 17 player.h npcs/npc.h weapons/weapon_manager.h weapons/crosshair.h \ 18 weapons/weapon.h weapons/ammo_container.h projectiles/projectile.h \ 19 power_ups/power_up.h power_ups/param_power_up.h power_ups/weapon_power_up.h \ 20 spawning_point.h effects/explosion.h effects/billboard.h \ 21 elements/glgui_energywidget.h 70 22 71 23 -
branches/playability/src/world_entities/WorldEntities.am
r9969 r9970 37 37 world_entities/weapons/fps_sniper_rifle.cc \ 38 38 world_entities/weapons/boomerang_gun.cc \ 39 world_entities/weapons/light_blaster.cc \ 40 world_entities/weapons/medium_blaster.cc \ 41 world_entities/weapons/heavy_blaster.cc \ 39 42 \ 40 43 world_entities/projectiles/bomb.cc \ … … 141 144 weapons/aiming_system.h \ 142 145 weapons/fps_sniper_rifle.h \ 146 weapons/light_blaster.h \ 147 weapons/medium_blaster.h \ 148 weapons/heavy_blaster.h \ 143 149 \ 144 150 projectiles/bomb.h \ -
branches/playability/src/world_entities/space_ships/space_ship.cc
r9966 r9970 23 23 24 24 #include "weapons/test_gun.h" 25 #include "weapons/light_blaster.h" 26 #include "weapons/medium_blaster.h" 27 #include "weapons/heavy_blaster.h" 28 #include "weapons/boomerang_gun.h" 25 29 #include "weapons/turret.h" 26 30 #include "weapons/cannon.h" … … 129 133 130 134 //weapons: 131 Weapon* wpRight = new TestGun(0);132 wpRight->setName(" testGunRight");133 Weapon* wpLeft = new TestGun(1);134 wpLeft->setName(" testGunLeft");135 136 Weapon* cannon = new Cannon();137 cannon->setName(" BFG");135 Weapon* wpRight = new LightBlaster (); 136 wpRight->setName("Blaster Right"); 137 Weapon* wpLeft = new LightBlaster (); 138 wpLeft->setName("Blaster Left"); 139 140 Weapon* cannon = new BoomerangGun();//Cannon(); 141 cannon->setName("End of World"); 138 142 139 143 … … 148 152 cannon->requestAction(WA_ACTIVATE); 149 153 150 this->curWeaponPrimary = 0;151 this->curWeaponSecondary = 0;154 curWeaponPrimary = 0; 155 curWeaponSecondary = 0; 152 156 153 157 Playable::weaponConfigChanged(); 154 158 155 weaponEnergyRegen = 10; // 10 einheiten pro Sekunde 159 reactorOutput = 10; 160 161 weaponEnergyRegen = 10; // 10 einheiten pro Sekunde 162 engineSpeedBase = 5; 163 shieldRegen = 2; 164 165 shieldEnergyShare = 0.3; 166 weaponEnergyShare = 0.3; 167 engineEnergyShare = 0.4; 168 169 shieldCur = 20; 170 shieldMax = 100; 156 171 157 172 /* … … 163 178 */ 164 179 165 this->loadModel("models/ships/ hoverglider_mainbody.obj");180 this->loadModel("models/ships/mantawing.obj"); 166 181 167 182 bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = bFire = bSecFire = false; … … 176 191 // cycle = 0.0; 177 192 178 this->setHealthMax( 100);179 this->setHealth( 80);193 this->setHealthMax(shieldMax); 194 this->setHealth(shieldCur); 180 195 181 196 travelSpeed = 0.0; … … 396 411 } 397 412 413 414 // Shield Regeneration and other regular calculations on the ship 415 this->regen(time); 416 417 // Weapon Regeneration and other regular calculations on the ship 398 418 this->weaponRegen(time); 419 420 // current engine speed output 421 this->engineSpeedCur = this->engineSpeedBase + this->reactorOutput * this->engineEnergyShare; 422 423 399 424 400 425 if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == SharedNetworkData::getInstance()->getHostID() ) … … 411 436 } 412 437 413 // Shield Regeneration and other regular calculations on the ship 414 this->regen(time); 438 415 439 416 440 … … 628 652 } 629 653 if (this->shieldCur != this->shieldMax || this->shieldRegen != 0){ 630 tmp = this->shieldCur + this->shieldRegen* time;654 tmp = this->shieldCur + (this->shieldRegen + this->reactorOutput * this->shieldEnergyShare) * time; 631 655 if( tmp > shieldMax) 632 656 this->shieldCur = this->shieldMax; … … 635 659 this->shieldActive = ( this->shieldActive || this->shieldCur > shieldTH); 636 660 } 661 662 this->setHealth( this->shieldCur); // FIXME currently just to test share system 663 637 664 if (this->electronicCur != this->electronicMax || this->electronicRegen != 0){ 638 665 tmp = this->electronicCur + this->electronicRegen * time; -
branches/playability/src/world_entities/space_ships/space_ship.h
r9965 r9970 82 82 float shieldMax; //!< maximum shield 83 83 float shieldEnergyShare; //!< percentage of reactor output 84 float shieldRegen; //!< shield regeneration rate per tick84 float shieldRegen; //!< shield regeneration rate per second 85 85 float shieldTH; //!< shield threshhold for reactivation 86 86 bool shieldActive; //!< wheather the shield is working … … 94 94 float electronicRegen; //!< electronic regenration rate per tick 95 95 96 int engineSpeedCur; //!< speed output 96 float engineSpeedCur; //!< speed output for movement = speed base + energy share part 97 float engineSpeedBase; //!< speed base 97 98 int enginePowerConsume; //!< energy needed 98 99 float engineEnergyShare; //!< percentage of reactor output
Note: See TracChangeset
for help on using the changeset viewer.