Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 18, 2009, 6:14:52 PM (15 years ago)
Author:
landauf
Message:

Added many new features in the Munition class:

  • there are now 3 modes: a) every weapon has it's own magazine b) all weapons use the same magazin c) no magazines, just a big munition pool
  • the Munition class handles the reloading of the magazine

Split the Weapon class into Weapon and WeaponMode. WeaponMode creates the fire of the Weapon. A weapon can own several WeaponModes (for example primary and secondary fire). But it's also possible to have a weapon with several muzzles which all fire at the same time (there's a WeaponMode for each muzzle).

Renamed LaserGun to LaserFire and Fusion to FusionFire. They inherit now from WeaponMode.

Changed the code in the Weapon class to use the new Munition functionality.

Added ReplenishingMunition, a subclass of Munition that replenishes itself (used for LaserGunMunition).

Added a reload command to reload magazines.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • code/branches/weapons/src/orxonox/objects/weaponSystem/weapons/FusionFire.h

    • Property svn:mergeinfo set to (toggle deleted branches)
      /code/branches/gui/src/orxonox/objects/weaponSystem/weapons/Fusion.hmergedeligible
      /code/branches/pickups/src/orxonox/objects/weaponSystem/weapons/Fusion.hmergedeligible
      /code/branches/pickups2/src/orxonox/objects/weaponSystem/weapons/Fusion.hmergedeligible
      /code/branches/weaponsystem/src/orxonox/objects/weaponSystem/weapons/Fusion.hmergedeligible
      /code/branches/buildsystem/src/orxonox/objects/weaponSystem/weapons/Fusion.h1874-2276,​2278-2400
      /code/branches/buildsystem2/src/orxonox/objects/weaponSystem/weapons/Fusion.h2506-2658
      /code/branches/buildsystem3/src/orxonox/objects/weaponSystem/weapons/Fusion.h2662-2708
      /code/branches/ceguilua/src/orxonox/objects/weaponSystem/weapons/Fusion.h1802-1808
      /code/branches/core3/src/orxonox/objects/weaponSystem/weapons/Fusion.h1572-1739
      /code/branches/gcc43/src/orxonox/objects/weaponSystem/weapons/Fusion.h1580
      /code/branches/input/src/orxonox/objects/weaponSystem/weapons/Fusion.h1629-1636
      /code/branches/lodfinal/src/orxonox/objects/weaponSystem/weapons/Fusion.h2372-2411
      /code/branches/miniprojects/src/orxonox/objects/weaponSystem/weapons/Fusion.h2754-2824
      /code/branches/network/src/orxonox/objects/weaponSystem/weapons/Fusion.h2356
      /code/branches/network64/src/orxonox/objects/weaponSystem/weapons/Fusion.h2210-2355
      /code/branches/objecthierarchy/src/orxonox/objects/weaponSystem/weapons/Fusion.h1911-2085,​2100,​2110-2169
      /code/branches/objecthierarchy2/src/orxonox/objects/weaponSystem/weapons/Fusion.h2171-2479
      /code/branches/overlay/src/orxonox/objects/weaponSystem/weapons/Fusion.h2117-2385
      /code/branches/physics/src/orxonox/objects/weaponSystem/weapons/Fusion.h1912-2055,​2107-2439
      /code/branches/physics_merge/src/orxonox/objects/weaponSystem/weapons/Fusion.h2436-2457
      /code/branches/presentation/src/orxonox/objects/weaponSystem/weapons/Fusion.h2369-2652,​2654-2660
      /code/branches/questsystem/src/orxonox/objects/weaponSystem/weapons/Fusion.h1894-2088
      /code/branches/questsystem2/src/orxonox/objects/weaponSystem/weapons/Fusion.h2107-2259
      /code/branches/script_trigger/src/orxonox/objects/weaponSystem/weapons/Fusion.h1295-1953,​1955
      /code/branches/weapon/src/orxonox/objects/weaponSystem/weapons/Fusion.h1925-2094
      /code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/Fusion.h2107-2488
    r2914 r2918  
    2727 */
    2828
    29 #ifndef _Fusion_H__
    30 #define _Fusion_H__
     29#ifndef _FusionFire_H__
     30#define _FusionFire_H__
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include "objects/weaponSystem/Weapon.h"
     33#include "objects/weaponSystem/WeaponMode.h"
    3434
    3535namespace orxonox
    3636{
    37     class _OrxonoxExport Fusion : public Weapon
     37    class _OrxonoxExport FusionFire : public WeaponMode
    3838    {
    3939        public:
    40             Fusion(BaseObject* creator);
    41             virtual ~Fusion();
     40            FusionFire(BaseObject* creator);
     41            virtual ~FusionFire() {}
    4242
    43             virtual void takeBullets();
    44             virtual void takeMagazines();
    45             virtual void createProjectile();
     43            virtual void fire();
    4644
    4745        private:
    4846            float speed_;
    49 
    5047    };
    5148}
    5249
    53 #endif /* _Fusion_H__ */
     50#endif /* _FusionFire_H__ */
Note: See TracChangeset for help on using the changeset viewer.