Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 24, 2015, 10:51:18 PM (9 years ago)
Author:
fvultier
Message:

There is now a HUD that shows the status of the weapon system: all weapons, weapon modes and their munition. Progress bars show the progress of replenishing munition.

Location:
code/branches/fabienHS15/src/modules/weapons
Files:
2 added
2 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/modules/weapons/munitions/CMakeLists.txt

    r10629 r10688  
    11ADD_SOURCE_FILES(WEAPONS_SRC_FILES
    2   ReplenishingMunition.cc
    32  LaserMunition.cc
     3  LightningMunition.cc
    44  FusionMunition.cc
    55  RocketMunition.cc
  • code/branches/fabienHS15/src/modules/weapons/munitions/FusionMunition.cc

    r9667 r10688  
    2828
    2929/**
    30     @file FusionMunition.h
     30    @file FusionMunition.cc
    3131    @brief Implementation of the FusionMunition class.
    3232*/
     
    4747        this->magazines_ = 10;
    4848
    49         this->bUseSeparateMagazines_ = true;
    50         this->bStackMunition_ = false;
     49        this->deployment_ = DEPLOYMENT_SEPARATE;
     50
    5151        this->reloadTime_ = 1.0f;
    5252
    5353        this->bAllowMunitionRefilling_ = true;
    5454        this->bAllowMultiMunitionRemovementUnderflow_ = true;
     55
     56        this->reloadTime_ = 0.5f;
    5557    }
    5658}
  • code/branches/fabienHS15/src/modules/weapons/munitions/GravityBombMunition.cc

    r10622 r10688  
    1919        this->magazines_ = 15;
    2020
    21         this->bUseSeparateMagazines_ = false;
    22         this->bStackMunition_ = true;
     21        this->deployment_ = DEPLOYMENT_STACK;
    2322
    2423        this->bAllowMunitionRefilling_ = true;
    2524        this->bAllowMultiMunitionRemovementUnderflow_ = false;
     25
     26        this->reloadTime_ = 0.0f;
    2627    }
    2728
  • code/branches/fabienHS15/src/modules/weapons/munitions/IceMunition.cc

    r10629 r10688  
    2828
    2929/**
    30     @file IceMunition.h
     30    @file IceMunition.cc
    3131    @brief Implementation of the IceMunition class.
    3232*/
     
    4747        this->magazines_ = 25;
    4848
    49         this->bUseSeparateMagazines_ = false;
    50         this->bStackMunition_ = true;
     49        this->deployment_ = DEPLOYMENT_STACK;
    5150
    5251        this->bAllowMunitionRefilling_ = false;
    5352        this->bAllowMultiMunitionRemovementUnderflow_ = false;
     53
     54        this->reloadTime_ = 0.5f;
    5455    }
    5556}
  • code/branches/fabienHS15/src/modules/weapons/munitions/LaserMunition.cc

    r9667 r10688  
    2828
    2929/**
    30     @file LaserMunition.h
     30    @file LaserMunition.cc
    3131    @brief Implementation of the LaserMunition class.
    3232*/
     
    4343        RegisterObject(LaserMunition);
    4444
    45         this->maxMunitionPerMagazine_ = 20;
    46         this->maxMagazines_ = 1;
    47         this->magazines_ = 1;
     45        this->maxMunitionPerMagazine_ = 10;
     46        this->maxMagazines_ = 10;
     47        this->magazines_ = 10;
    4848
    49         this->bUseSeparateMagazines_ = false;
    50         this->bStackMunition_ = true;
     49        this->deployment_ = DEPLOYMENT_SEPARATE;
    5150
    5251        this->bAllowMunitionRefilling_ = true;
     
    5554        this->replenishInterval_ = 0.5f;
    5655        this->replenishMunitionAmount_ = 1;
     56
     57        this->reloadTime_ = 0.8f;
    5758    }
    5859}
  • code/branches/fabienHS15/src/modules/weapons/munitions/LaserMunition.h

    r9667 r10688  
    3636
    3737#include "weapons/WeaponsPrereqs.h"
    38 #include "ReplenishingMunition.h"
     38#include "weaponsystem/ReplenishingMunition.h"
    3939
    4040namespace orxonox
  • code/branches/fabienHS15/src/modules/weapons/munitions/RocketMunition.cc

    r9667 r10688  
    2828
    2929/**
    30     @file RocketMunition.h
     30    @file RocketMunition.cc
    3131    @brief Implementation of the RocketMunition class.
    3232*/
     
    4747        this->magazines_ = 10;
    4848
    49         this->bUseSeparateMagazines_ = false;
    50         this->bStackMunition_ = true;
     49        this->deployment_ = DEPLOYMENT_STACK;
    5150
    5251        this->bAllowMunitionRefilling_ = false;
    5352        this->bAllowMultiMunitionRemovementUnderflow_ = false;
     53
     54        this->reloadTime_ = 0.5f;
    5455    }
    5556}
  • code/branches/fabienHS15/src/modules/weapons/munitions/SplitMunition.cc

    r10629 r10688  
    2828
    2929/**
    30     @file SplitMunition.h
     30    @file SplitMunition.cc
    3131    @brief Implementation of the SplitMunition class.
    3232*/
     
    4747        this->magazines_ = 25;
    4848
    49         this->bUseSeparateMagazines_ = false;
    50         this->bStackMunition_ = true;
     49        this->deployment_ = DEPLOYMENT_STACK;
    5150
    5251        this->bAllowMunitionRefilling_ = true;
    5352        this->bAllowMultiMunitionRemovementUnderflow_ = false;
     53
     54        this->reloadTime_ = 0.5f;
    5455    }
    5556}
  • code/branches/fabienHS15/src/modules/weapons/projectiles/GravityBombField.cc

    r10622 r10688  
    164164        if (lifetime_ <= -4)
    165165        {
    166             orxout(debug_output) << "Timeout. Destroying field." << endl;
    167166            this->destroy();
    168167        }
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/EnergyDrink.cc

    r10622 r10688  
    6363        this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&EnergyDrink::shot, this)));
    6464        this->delayTimer_.stopTimer();
     65
     66        hudImageString_ = "Orxonox/WSHUD_WM_EnergyDrink";
    6567    }
    6668
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/FusionFire.cc

    r10622 r10688  
    5858
    5959        this->setMunitionName("FusionMunition");
     60
     61        hudImageString_ = "Orxonox/WSHUD_WM_FusionFire";
    6062    }
    6163
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/GravityBombFire.cc

    r10622 r10688  
    3131        this->setMunitionName("GravityBombMunition");
    3232        this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8);    ///< sets sound of the bomb as it is fired.
     33
     34        hudImageString_ = "Orxonox/WSHUD_WM_GravityBombFire";
    3335    }
    3436
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/HsW01.cc

    r10296 r10688  
    6969
    7070        this->setDefaultSound(this->sound_);
     71
     72        hudImageString_ = "Orxonox/WSHUD_WM_HsW01";
    7173    }
    7274
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/IceGun.cc

    r10629 r10688  
    5959        this->setFreezeFactor(0.5);
    6060
    61         this->setMunitionName("LaserMunition");
     61        this->setMunitionName("IceMunition");
    6262        this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
     63
     64        hudImageString_ = "Orxonox/WSHUD_WM_IceGun";
    6365    }
    6466
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/LaserFire.cc

    r10622 r10688  
    5656
    5757        this->setMunitionName("LaserMunition");
     58
     59        hudImageString_ = "Orxonox/WSHUD_WM_LaserFire";
    5860    }
    5961
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/LightningGun.cc

    r10296 r10688  
    5454        this->speed_ = 750.0f;
    5555
    56         this->setMunitionName("LaserMunition");
     56        this->setMunitionName("LightningMunition");
    5757        this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
     58
     59        hudImageString_ = "Orxonox/WSHUD_WM_LightningGun";
    5860    }
    5961
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.cc

    r10296 r10688  
    5959        this->setMunitionName("RocketMunition");
    6060        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
     61
     62        hudImageString_ = "Orxonox/WSHUD_WM_RocketFire";
    6163    }
    6264
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFireOld.cc

    r10622 r10688  
    5959        this->setMunitionName("RocketMunition");
    6060        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
     61
     62        hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire";
    6163    }
    6264
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/SimpleRocketFire.cc

    r9667 r10688  
    6464        this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4f);
    6565        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
     66
     67        hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire";
    6668    }
    6769
     
    8991
    9092        WorldEntity* pawn = static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget();
    91         if (pawn) controller->setTarget(pawn);
     93        if (pawn)
     94            controller->setTarget(pawn);
    9295    }
    9396}
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/SplitGun.cc

    r10629 r10688  
    6262        this->setMunitionName("SplitMunition");
    6363        this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
     64
     65        hudImageString_ = "Orxonox/WSHUD_WM_SplitGun";
    6466    }
    6567
Note: See TracChangeset for help on using the changeset viewer.