Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10746


Ignore:
Timestamp:
Nov 1, 2015, 10:25:57 PM (9 years ago)
Author:
fvultier
Message:
 
Location:
code/branches/fabienHS15
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/data/levels/pickups.oxw

    r10724 r10746  
    8787
    8888    <!-- Meta pickups -->
    89 
    90     <Template name=usemetapickup baseclass=MetaPickup>
    91       <MetaPickup representation="use" metaType="use" />
    92     </Template>
    93    
    94     <Template name=dropmetapickup baseclass=MetaPickup>
    95       <MetaPickup representation="drop" metaType="drop" />
    96     </Template>
    97    
    98     <Template name=destroymetapickup baseclass=MetaPickup>
    99       <MetaPickup representation="destroy" metaType="destroy" />
    100     </Template>
    101    
    102     <Template name=destroycarriermetapickup baseclass=MetaPickup>
    103       <MetaPickup representation="destroycarrier" metaType="destroyCarrier" />
    104     </Template>
    10589   
    10690    <PickupSpawner pickup=usemetapickup position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     
    11599    <!-- Drone pickup -->
    116100   
    117     <PickupSpawner pickup=dronepickup position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     101    <PickupSpawner pickup=dronepickup position="-25,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    118102   
    119103    <!-- Other pickups -->
  • code/branches/fabienHS15/data/levels/templates/pickupRepresentationTemplates.oxt

    r10724 r10746  
    381381</Template>
    382382
     383<Template name=usemetapickup baseclass=MetaPickup>
     384  <MetaPickup representation="use" metaType="use" />
     385</Template>
     386
    383387<Template name=droppickupRepresentation>
    384388    <PickupRepresentation>
     
    397401</Template>
    398402
     403<Template name=dropmetapickup baseclass=MetaPickup>
     404  <MetaPickup representation="drop" metaType="drop" />
     405</Template>
     406
    399407<Template name=destroypickupRepresentation>
    400408    <PickupRepresentation>
     
    413421</Template>
    414422
     423<Template name=destroymetapickup baseclass=MetaPickup>
     424  <MetaPickup representation="destroy" metaType="destroy" />
     425</Template>
     426
    415427<Template name=destroycarrierpickupRepresentation>
    416428    <PickupRepresentation>
     
    427439        </spawner-representation>
    428440    </PickupRepresentation>
     441</Template>
     442
     443<Template name=destroycarriermetapickup baseclass=MetaPickup>
     444  <MetaPickup representation="destroycarrier" metaType="destroyCarrier" />
    429445</Template>
    430446
  • code/branches/fabienHS15/data/overlays/HUDTemplates3.oxo

    r10739 r10746  
    3535     background        = "Orxonox/HealthBarBackground"
    3636     size              = "0.40, 0.08"
    37      position          = "0.0 , 0.9 "
     37     position          = "0.0 , 0.85 "
    3838     pickpoint         = "0, 1"
    3939     bartexture        = "healthbar_bar.png"
     
    5151      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
    5252    </HUDHealthBar>
     53
     54    <HUDShieldBar
     55     name          = "ShieldBar1"
     56     background    = "Orxonox/BarBackground"
     57     size          = "0.40, 0.04"
     58     position      = "0.0 , 0.9 "
     59     pickpoint     = "0, 1"
     60     correctaspect = true
     61     iconmaterial  = "Orxonox/BarIconShield"
     62    >
     63      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
     64      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
     65      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
     66    </HUDShieldBar>   
    5367
    5468    <HUDSpeedBar
  • code/branches/fabienHS15/src/modules/overlays/hud/CMakeLists.txt

    r10688 r10746  
    55  HUDSpeedBar.cc
    66  HUDBoostBar.cc
     7  HUDShieldBar.cc
    78  HUDHealthBar.cc
    89  HUDTimer.cc
  • code/branches/fabienHS15/src/modules/pickup/items/MunitionPickup.h

    r10715 r10746  
    4848namespace orxonox
    4949{
    50 
     50    /**
     51    @brief
     52        The MunitionPickup gives munition to the user (a @ref Pawn).
     53    */
    5154    class _PickupExport MunitionPickup : public Pickup
    5255    {
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.cc

    r10739 r10746  
    6161
    6262        this->bAlive_ = true;
    63         this->bShieldRecharging_ = false;
    6463
    6564        this->health_ = 0;
     
    7170        this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max
    7271        this->shieldAbsorption_ = 0.5;
    73 
    7472        this->shieldRechargeRate_ = 0;
    7573        this->shieldRechargeWaitTime_ = 1.0f;
     
    153151    void Pawn::registerVariables()
    154152    {
    155         registerVariable(this->bAlive_,           VariableDirection::ToClient);
    156         registerVariable(this->health_,           VariableDirection::ToClient);
    157         registerVariable(this->maxHealth_,        VariableDirection::ToClient);
    158         registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
    159         registerVariable(this->maxShieldHealth_,  VariableDirection::ToClient);
    160         registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
    161         registerVariable(this->bShieldRecharging_,          VariableDirection::ToServer);
    162         registerVariable(this->aimPosition_,      VariableDirection::ToServer);  // For the moment this variable gets only transfered to the server
     153        registerVariable(this->bAlive_,            VariableDirection::ToClient);
     154        registerVariable(this->health_,            VariableDirection::ToClient);
     155        registerVariable(this->maxHealth_,         VariableDirection::ToClient);
     156        registerVariable(this->shieldHealth_,      VariableDirection::ToClient);
     157        registerVariable(this->maxShieldHealth_,   VariableDirection::ToClient);
     158        registerVariable(this->shieldAbsorption_,  VariableDirection::ToClient);
     159        registerVariable(this->aimPosition_,       VariableDirection::ToServer);  // For the moment this variable gets only transfered to the server
    163160    }
    164161
     
    167164        SUPER(Pawn, tick, dt);
    168165
    169         this->bShieldRecharging_ = false;
    170 
     166        // Recharge the shield
    171167        // TODO: use the existing timer functions instead
    172168        if(this->shieldRechargeWaitCountdown_ > 0)
     
    252248        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
    253249        {
     250            // Health-damage cannot be absorbed by shields.
     251            // Shield-damage only reduces shield health.
     252            // Normal damage can be (partially) absorbed by shields.
     253
    254254            if (shielddamage >= this->getShieldHealth())
    255255            {
     
    480480    }
    481481
    482     void Pawn::reload()
    483     {
    484         this->bShieldRecharging_ = true;
    485     }
    486 
    487482    void Pawn::postSpawn()
    488483    {
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.h

    r10739 r10746  
    4242    /**
    4343    @brief
    44         Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
     44        Everything in Orxonox that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
    4545        its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at
    4646        or below zero. If it is, the pawn gets killed.
     
    141141
    142142            virtual void fired(unsigned int firemode);
    143             virtual void reload();
    144143            virtual void postSpawn();
    145144
     
    234233
    235234            WeaponSystem* weaponSystem_;
    236             bool bShieldRecharging_;
    237235
    238236            std::string spawnparticlesource_;
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.h

    r10724 r10746  
    5353        - The <b>boost</b>, there are quite some parameters pertaining to boosting. The boost is a special move of the SpaceShip, where, for a limited amount of time, it can fly considerably faster than usual. The <b>boostPower</b> is the amount of power available for boosting. The <b>boostPowerRate</b> is the rate at which the boost power is replenished. The <b>boostRate</b> is the rate at which boosting uses power. And the <b>boostCooldownDuration</b> is the time the SpaceShip cannot boost, once all the boost power has been used up. Naturally all of these parameters must be non-negative.
    5454        - The <b>boost shaking</b>, when the SpaceShip boosts, the camera shakes to create a more immersive effect. Two parameters can be used to adjust the effect. The <b>shakeFrequency</b> is the frequency with which the camera shakes. And the <b>shakeAmplitude</b> is the amount with which the camera shakes. Again these parameters must bee non-negative.
    55         - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again tow parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated.
     55        - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again two parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated.
    5656
    5757        As mentioned @ref orxonox::Engine Engines can be mounted on the SpaceShip. Here is a (primitive) example of a SpaceShip defined in XML:
     
    267267            bool bBoostCooldown_;         //!< Whether the SpaceShip is currently in boost cooldown, during which boosting is impossible.
    268268            float initialBoostPower_;     //!< The initial (and maximal) boost power.
    269             float boostPower_;            //!< The current boost power.
     269            float boostPower_;            //!< The current boost power. If the boost power is reduced to zero the boost cooldown will start.
    270270            float boostPowerRate_;        //!< The rate at which the boost power is recharged.
    271271            float boostRate_;             //!< The rate at which boost power is used up.
     
    294294            std::vector<Engine*> engineList_; //!< The list of all Engines mounted on this SpaceShip.
    295295
    296             Timer timer_;                          //!< Timer for the cooldown duration.
     296            Timer timer_;                          //!< Timer for the cooldown of the boost.
    297297            float shakeDt_;                        //!< Temporary variable for the shaking of the camera.
    298298            Vector3 cameraOriginalPosition_;       //!< The original position of the camera before shaking it.
Note: See TracChangeset for help on using the changeset viewer.