Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9970 in orxonox.OLD for branches/playability/src/world_entities


Ignore:
Timestamp:
Nov 29, 2006, 4:22:38 PM (18 years ago)
Author:
marcscha
Message:

modifications done this afternoon

Location:
branches/playability/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/Makefile.am

    r9869 r9970  
    66
    77## 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
     8libORXwe_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
    3614
    3715
    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_)
     16noinst_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                                   
    7022
    7123
  • branches/playability/src/world_entities/WorldEntities.am

    r9969 r9970  
    3737                world_entities/weapons/fps_sniper_rifle.cc \
    3838                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 \
    3942                \
    4043                world_entities/projectiles/bomb.cc \
     
    141144                weapons/aiming_system.h \
    142145                weapons/fps_sniper_rifle.h \
     146                weapons/light_blaster.h \
     147                weapons/medium_blaster.h \
     148                weapons/heavy_blaster.h \
    143149                \
    144150                projectiles/bomb.h \
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r9966 r9970  
    2323
    2424#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"
    2529#include "weapons/turret.h"
    2630#include "weapons/cannon.h"
     
    129133
    130134  //weapons:
    131   Weapon* wpRight = new TestGun(0);
    132   wpRight->setName("testGun Right");
    133   Weapon* wpLeft = new TestGun(1);
    134   wpLeft->setName("testGun Left");
    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");
    138142
    139143
     
    148152  cannon->requestAction(WA_ACTIVATE);
    149153
    150   this->curWeaponPrimary    = 0;
    151   this->curWeaponSecondary  = 0;
     154  curWeaponPrimary    = 0;
     155  curWeaponSecondary  = 0;
    152156
    153157  Playable::weaponConfigChanged();
    154158
    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;
    156171
    157172  /*
     
    163178  */
    164179
    165   this->loadModel("models/ships/hoverglider_mainbody.obj");
     180  this->loadModel("models/ships/mantawing.obj");
    166181
    167182  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = bFire = bSecFire = false;
     
    176191  //  cycle = 0.0;
    177192
    178   this->setHealthMax(100);
    179   this->setHealth(80);
     193  this->setHealthMax(shieldMax);
     194  this->setHealth(shieldCur);
    180195
    181196  travelSpeed = 0.0;
     
    396411  }
    397412
     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
    398418  this->weaponRegen(time);
     419
     420  // current engine speed output
     421  this->engineSpeedCur = this->engineSpeedBase + this->reactorOutput * this->engineEnergyShare;
     422
     423
    399424
    400425  if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == SharedNetworkData::getInstance()->getHostID() )
     
    411436  }
    412437
    413   // Shield Regeneration and other regular calculations on the ship
    414   this->regen(time);
     438 
    415439
    416440
     
    628652  }
    629653  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;
    631655    if( tmp > shieldMax)
    632656      this->shieldCur = this->shieldMax;
     
    635659    this->shieldActive = ( this->shieldActive || this->shieldCur > shieldTH);
    636660  }
     661
     662  this->setHealth( this->shieldCur);      // FIXME currently just to test share system
     663
    637664  if (this->electronicCur != this->electronicMax || this->electronicRegen != 0){
    638665    tmp = this->electronicCur + this->electronicRegen * time;
  • branches/playability/src/world_entities/space_ships/space_ship.h

    r9965 r9970  
    8282    float       shieldMax;          //!< maximum shield
    8383    float       shieldEnergyShare;  //!< percentage of reactor output
    84     float       shieldRegen;        //!< shield regeneration rate per tick
     84    float       shieldRegen;        //!< shield regeneration rate per second
    8585    float       shieldTH;           //!< shield threshhold for reactivation
    8686    bool        shieldActive;       //!< wheather the shield is working
     
    9494    float       electronicRegen;    //!< electronic regenration rate per tick
    9595
    96     int         engineSpeedCur;     //!< speed output
     96    float       engineSpeedCur;     //!< speed output for movement = speed base + energy share part
     97    float       engineSpeedBase;    //!< speed base
    9798    int         enginePowerConsume; //!< energy needed
    9899    float       engineEnergyShare;  //!< percentage of reactor output
Note: See TracChangeset for help on using the changeset viewer.