Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10814


Ignore:
Timestamp:
Nov 17, 2015, 10:30:24 PM (9 years ago)
Author:
fvultier
Message:
 
Location:
code/branches/fabienHS15
Files:
2 added
51 edited

Legend:

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

    r10262 r10814  
    6767        maxshieldhealth     = "50"
    6868        shieldabsorption    = "0.8"
    69         reloadrate          = "100"
    70         reloadwaittime      = "0.1"
     69        shieldrechargerate  = "100"
     70        shieldrechargewaittime = "0.1"
    7171        name                = "Tanis1"
    7272        radarname           = "Light Destroyer" >
     
    197197        maxshieldhealth     = "200"
    198198        shieldabsorption    = "0.8"
    199         reloadrate          = "1"
    200         reloadwaittime      = "1"
     199        shieldrechargerate  = "1"
     200        shieldrechargewaittime = "1"
    201201        name                = "Tanis0"
    202202        radarname           = "Tanis big ship" >
     
    216216        maxshieldhealth     = "50"
    217217        shieldabsorption    = "0.8"
    218         reloadrate          = "1"
    219         reloadwaittime      = "1"
     218        shieldrechargerate  = "1"
     219        shieldrechargewaittime = "1"
    220220        name                = "Tanis0"
    221221        radarname           = "Pirate1" >
     
    239239        maxshieldhealth     = "50"
    240240        shieldabsorption    = "0.8"
    241         reloadrate          = "1"
    242         reloadwaittime      = "1"
     241        shieldrechargerate  = "1"
     242        shieldrechargewaittime = "1"
    243243        name                = "Tanis0"
    244244        radarname           = "Pirate2" >
  • code/branches/fabienHS15/data/levels/iJohnVane_TriptoArea51.oxw

    r10274 r10814  
    169169        maxshieldhealth     = "120"
    170170        shieldabsorption    = "0.8"
    171         reloadrate          = "1"
    172         reloadwaittime      = "1"
     171        shieldrechargerate  = "1"
     172        shieldrechargewaittime = "1"
    173173        name                = "cruiser"
    174174        radarname           = "Spacecruiser" >
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsAssff.oxi

    r10791 r10814  
    4040        <Weapon>
    4141          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
    42           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     42          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=8 />
    4343        </Weapon>
    4444      </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsAssff2.oxi

    r10791 r10814  
    3838        <Weapon>
    3939          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
    40           <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
     40          <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 fuel=10 />
    4141        </Weapon>
    4242      </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsCollateral.oxi

    r10791 r10814  
    4242        <Weapon>
    4343          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    44           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     44          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    4545        </Weapon>
    4646      </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsFS15.oxi

    r10791 r10814  
    3838      <GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    3939      <RocketFireOld mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
    40       <RocketFire mode=4 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     40      <RocketFire mode=4 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    4141    </Weapon>
    4242  </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsHeartAttack.oxi

    r10791 r10814  
    3434          <LaserFire mode=1 munitionpershot=1 muzzleoffset="2.2,6,16" damage=30 shielddamage=20 />
    3535          <LaserFire mode=1 munitionpershot=1 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
    36           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     36          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    3737          <GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    3838        </Weapon>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsHeavyCruiser.oxi

    r10791 r10814  
    4040        <Weapon>
    4141          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    42           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     42          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    4343        </Weapon>
    4444      </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi

    r10791 r10814  
    3434        <Weapon>
    3535          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    36           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     36          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    3737        </Weapon>
    3838      </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsImmTest.oxi

    r10791 r10814  
    4444        <Weapon>
    4545          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" shielddamage=50 />
    46           <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 />
     46          <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 fuel=10 />
    4747        </Weapon>
    4848      </WeaponPack>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsSpacecruiser.oxi

    r10791 r10814  
    4444        <Weapon>
    4545          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    46           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     46          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    4747        </Weapon>
    4848        <Weapon>
  • code/branches/fabienHS15/data/levels/includes/weaponSettingsbigship.oxi

    r10791 r10814  
    3535        <Weapon>
    3636          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
    37           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
     37          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
    3838        </Weapon>
    3939      </WeaponPack>
  • code/branches/fabienHS15/data/levels/missionOne.oxw

    r9985 r10814  
    10801080        maxshieldhealth     = "120"
    10811081        shieldabsorption    = "0.8"
    1082         reloadrate          = "1"
    1083         reloadwaittime      = "1"
     1082        shieldrechargerate  = "1"
     1083        shieldrechargewaittime = "1"
    10841084        name                = "cruiser"
    10851085        radarname           = "Spacecruiser" >
  • code/branches/fabienHS15/data/levels/presentationHS13.oxw

    r10258 r10814  
    162162        maxshieldhealth     = "120"
    163163        shieldabsorption    = "0.8"
    164         reloadrate          = "1"
    165         reloadwaittime      = "1"
     164        shieldrechargerate  = "1"
     165        shieldrechargewaittime = "1"
    166166        name                = "Tanis1"
    167167        radarname           = "Tanis Cruiser" >
  • code/branches/fabienHS15/data/levels/shieldTest.oxw

    r9016 r10814  
    4343    shieldabsorption= 1
    4444
    45     reloadrate= "10"
    46     reloadwaittime= 1
     45    shieldrechargerate = "10"
     46    shieldrechargewaittime = 1
    4747
    4848>
  • code/branches/fabienHS15/data/levels/templates/HeavyCruiser.oxt

    r10216 r10814  
    1919   maxshieldhealth     = 50
    2020   shieldabsorption    = 0.8
    21    reloadrate          = 1
    22    reloadwaittime      = 1
     21   shieldrechargerate  = 1
     22   shieldrechargewaittime = 1
    2323
    2424   primaryThrust     = 300
  • code/branches/fabienHS15/data/levels/templates/HeavyCruiserBody.oxt

    r9943 r10814  
    1717   maxshieldhealth     = 500
    1818   shieldabsorption    = 0.8
    19    reloadrate          = 1
    20    reloadwaittime      = 1
     19   shieldrechargerate  = 1
     20   shieldrechargewaittime = 1
    2121
    2222   primaryThrust     = 300
  • code/branches/fabienHS15/data/levels/templates/ModularSpaceShipTest.oxt

    r10262 r10814  
    1515   maxshieldhealth     = 50
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/bigship.oxt

    r9664 r10814  
    1515   maxshieldhealth     = 50
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 30
  • code/branches/fabienHS15/data/levels/templates/enemyInvader.oxt

    r9954 r10814  
    1515   maxshieldhealth     = 10
    1616   shieldabsorption    = 0.9
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 150
     
    7777   maxshieldhealth     = 20
    7878   shieldabsorption    = 0.9
    79    reloadrate          = 1
    80    reloadwaittime      = 1
     79   shieldrechargerate  = 1
     80   shieldrechargewaittime = 1
    8181
    8282   primaryThrust     = 150
  • code/branches/fabienHS15/data/levels/templates/spaceshipAssff.oxt

    r9939 r10814  
    1515   maxshieldhealth     = 50
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/spaceshipAssff2.oxt

    r8860 r10814  
    1515   maxshieldhealth     = 150
    1616   shieldabsorption    = 0.95
    17    reloadrate          = 5
    18    reloadwaittime      = 0.5
     17   shieldrechargerate  = 5
     18   shieldrechargewaittime = 0.5
    1919
    2020   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/spaceshipCollateralDamage.oxt

    r9664 r10814  
    1616   maxshieldhealth     = 50
    1717   shieldabsorption    = 0.8
    18    reloadrate          = 1
    19    reloadwaittime      = 1
     18   shieldrechargerate  = 1
     19   shieldrechargewaittime = 1
    2020
    2121   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/spaceshipDodgeRace.oxt

    r10262 r10814  
    1515   maxshieldhealth     = 20
    1616   shieldabsorption    = 0.1
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 150
  • code/branches/fabienHS15/data/levels/templates/spaceshipEscort.oxt

    r9664 r10814  
    1515   maxshieldhealth     = 60
    1616   shieldabsorption    = 0.9
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 150
  • code/branches/fabienHS15/data/levels/templates/spaceshipFS15.oxt

    r10622 r10814  
    1515   maxshieldhealth     = 800
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 40
  • code/branches/fabienHS15/data/levels/templates/spaceshipGhost.oxt

    r8858 r10814  
    1515   maxshieldhealth     = 150
    1616   shieldabsorption    = 0.9
    17    reloadrate          = 3
    18    reloadwaittime      = 0.0
     17   shieldrechargerate  = 3
     18   shieldrechargewaittime = 0.0
    1919
    2020   primaryThrust     = 600
  • code/branches/fabienHS15/data/levels/templates/spaceshipHeartAttack.oxt

    r10622 r10814  
    1515   maxshieldhealth     = 800
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 40
  • code/branches/fabienHS15/data/levels/templates/spaceshipInvader.oxt

    r9943 r10814  
    1515   maxshieldhealth     = 60
    1616   shieldabsorption    = 0.9
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 150
  • code/branches/fabienHS15/data/levels/templates/spaceshipPirate.oxt

    r8858 r10814  
    1515   maxshieldhealth     = 40
    1616   shieldabsorption    = 0.6
    17    reloadrate          = 2
    18    reloadwaittime      = 0.5
     17   shieldrechargerate  = 2
     18   shieldrechargewaittime = 0.5
    1919
    2020   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/spaceshipRace.oxt

    r9348 r10814  
    1515   maxshieldhealth     = 50
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/spaceshipRing.oxt

    r10622 r10814  
    1515   maxshieldhealth     = 60
    1616   shieldabsorption    = 0.9
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 150
  • code/branches/fabienHS15/data/levels/templates/spaceshipSpacecruiser.oxt

    r9348 r10814  
    1515   maxshieldhealth     = 90
    1616   shieldabsorption    = 0.9
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 90
  • code/branches/fabienHS15/data/levels/templates/spaceshipSwallow.oxt

    r8858 r10814  
    1515   maxshieldhealth     = 80
    1616   shieldabsorption    = 0.75
    17    reloadrate          = 1.5
    18    reloadwaittime      = 0.2
     17   shieldrechargerate  = 1.5
     18   shieldrechargewaittime = 0.2
    1919
    2020   primaryThrust     = 600;
  • code/branches/fabienHS15/data/levels/templates/spaceshipTurret.oxt

    r9664 r10814  
    1515   maxshieldhealth     = 50
    1616   shieldabsorption    = 0.8
    17    reloadrate          = 1
    18    reloadwaittime      = 1
     17   shieldrechargerate  = 1
     18   shieldrechargewaittime = 1
    1919
    2020   primaryThrust     = 100
  • code/branches/fabienHS15/data/levels/templates/towerdefensetower.oxt

    r10622 r10814  
    44
    55        explosionchunks        = 6
    6         reloadrate=10
    7         reloadwaittime=5
     6        shieldrechargerate=10
     7        shieldrechargewaittime=5
    88        collisionType="none"
    99        pitch="0"
  • code/branches/fabienHS15/data/levels/towerDefense.oxw

    r10791 r10814  
    3939  <TowerDefenseTower
    4040  explosionchunks=6
    41   reloadrate=10
    42   reloadwaittime=5
     41  shieldrechargerate=10
     42  shieldrechargewaittime=5
    4343  collisionType="none"
    4444  pitch="0"
     
    7979  <TowerDefenseTower
    8080  explosionchunks=6
    81   reloadrate=10
    82   reloadwaittime=5
     81  shieldrechargerate=10
     82  shieldrechargewaittime=5
    8383  collisionType="none"
    8484  pitch="0"
     
    122122  <TowerDefenseTower
    123123  explosionchunks=6
    124   reloadrate=10
    125   reloadwaittime=5
     124  shieldrechargerate=10
     125  shieldrechargewaittime=5
    126126  collisionType="none"
    127127  pitch="0"
     
    162162  <TowerDefenseTower
    163163  explosionchunks=6
    164   reloadrate=10
    165   reloadwaittime=5
     164  shieldrechargerate=10
     165  shieldrechargewaittime=5
    166166  collisionType="none"
    167167  pitch="0"
     
    189189        </links>
    190190        <Weapon>
    191           <RocketFire mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 /> 
     191          <RocketFire mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 fuel=10/> 
    192192        </Weapon>
    193193      </WeaponPack>
     
    205205  <TowerDefenseTower
    206206  explosionchunks=6
    207   reloadrate=10
    208   reloadwaittime=5
     207  shieldrechargerate=10
     208  shieldrechargewaittime=5
    209209  collisionType="none"
    210210  pitch="0"
     
    258258   maxshieldhealth     = 15
    259259   shieldabsorption    = 0.8
    260    reloadrate          = 1
    261    reloadwaittime      = 1
     260   shieldrechargerate  = 1
     261   shieldrechargewaittime = 1
    262262
    263263   primaryThrust     = 1000
     
    323323   maxshieldhealth     = 0
    324324   shieldabsorption    = 0.8
    325    reloadrate          = 1
    326    reloadwaittime      = 1
     325   shieldrechargerate = 1
     326   shieldrechargewaittime = 1
    327327
    328328   primaryThrust     = 100
     
    396396   maxshieldhealth     = 5
    397397   shieldabsorption    = 0.8
    398    reloadrate          = 1
    399    reloadwaittime      = 1
     398   shieldrechargerate  = 1
     399   shieldrechargewaittime = 1
    400400
    401401   primaryThrust     = 100
  • code/branches/fabienHS15/data/overlays/HUDTemplates3.oxo

    r10746 r10814  
    2424<Template name="spectatorhud">
    2525  <OverlayGroup name = "spectatorhud" scale = "1, 1">
     26  </OverlayGroup>
     27</Template>
     28
     29<Template name="rockethud">
     30  <OverlayGroup name = "rockethud" scale = "1, 1">
     31    <HUDRocketFuelBar
     32     name          = "RocketFuelBar1"
     33     background    = "Orxonox/BarBackground"
     34     size          = "0.40, 0.04"
     35     position      = "0.0 , 1.0 "
     36     pickpoint     = "0, 1"
     37     correctaspect = true
     38     iconmaterial  = "Orxonox/BarIconFuel"
     39    >
     40      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
     41      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
     42      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
     43    </HUDRocketFuelBar>
    2644  </OverlayGroup>
    2745</Template>
  • code/branches/fabienHS15/src/modules/overlays/CMakeLists.txt

    r7163 r10814  
    1616  LINK_LIBRARIES
    1717    orxonox
     18    weapons
    1819  SOURCE_FILES ${OVERLAYS_SRC_FILES}
    1920)
  • code/branches/fabienHS15/src/modules/overlays/OverlaysPrereqs.h

    r9939 r10814  
    9090    class HUDRadar;
    9191    class HUDSpeedBar;
     92    class HUDShieldBar;
    9293    class HUDBoostBar;
     94    class HUDRocketFuelBar;
    9395    class HUDTimer;
    9496    class HUDAimAssistant;
  • code/branches/fabienHS15/src/modules/overlays/hud/CMakeLists.txt

    r10746 r10814  
    77  HUDShieldBar.cc
    88  HUDHealthBar.cc
     9  HUDRocketFuelBar.cc
    910  HUDTimer.cc
    1011  HUDEnemyHealthBar.cc
  • code/branches/fabienHS15/src/modules/weapons/WeaponsPrereqs.h

    r10622 r10814  
    6969{
    7070    class MuzzleFlash;
     71    class IceGunFreezer;
     72    class RocketController;
    7173
    7274    // munitions
    7375    class FusionMunition;
    7476    class LaserMunition;
    75     class ReplenishingMunition;
    7677    class RocketMunition;
    7778    class GravityBombMuntion;
     79    class IceMunition;
     80    class LightningMunition;
     81    class SplitMunition;
    7882
    7983    // projectiles
     
    8185    class LightningGunProjectile;
    8286    class ParticleProjectile;
     87    class IceProjectile;
     88    class SplitProjectile;
    8389    class Projectile;
     90    class BasicProjectile;
    8491    class Rocket;
    8592    class RocketOld;
     
    9198    class FusionFire;
    9299    class HsW01;
     100    class IceGun;
     101    class SplitGun;
    93102    class LaserFire;
    94103    class LightningGun;
  • code/branches/fabienHS15/src/modules/weapons/projectiles/Rocket.cc

    r10795 r10814  
    6666
    6767        this->localAngularVelocity_ = 0;
    68         this->lifetime_ = 100.0f;
     68        this->lifetime_ = 20.0f;
    6969
    7070        if (GameMode::isMaster())
     
    100100            this->attachCollisionShape(collisionShape);
    101101
    102             this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
    103 
    104102            // Add sound
    105103            this->defSndWpnEngine_ = new WorldSound(this->getContext());
     
    114112            this->defSndWpnLaunch_->setVolume(1.0f);
    115113            this->attach(defSndWpnLaunch_);
     114
     115            this->setHudTemplate("rockethud");
    116116        }
    117117        else
     
    320320    }
    321321
     322    float Rocket::getFuel() const
     323    {
     324        return this->destroyTimer_.getRemainingTime();
     325    }
     326
     327    void Rocket::setMaxFuel(float fuel)
     328    {
     329        this->lifetime_ = fuel;
     330        this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
     331    }
    322332}
  • code/branches/fabienHS15/src/modules/weapons/projectiles/Rocket.h

    r10216 r10814  
    118118            virtual void fired(unsigned int firemode);
    119119
     120            /**
     121            @brief Set the maximum lifetime of the rocket.
     122            */
     123            virtual void setMaxFuel(float fuel);
     124            /**
     125            @brief Get the maximum lifetime of the rocket.
     126            */
     127            inline float getMaxFuel() const
     128                { return lifetime_; }
     129            virtual float getFuel() const;
     130
    120131        private:
    121132            Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input.
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.cc

    r10794 r10814  
    4141#include "weaponsystem/WeaponSystem.h"
    4242#include "worldentities/pawns/Pawn.h"
    43 
     43#include "core/XMLPort.h"
    4444#include "weapons/projectiles/Rocket.h"
    4545
     
    5656        this->damage_ = 0.0f;
    5757        this->speed_ = 500.0f;
     58        this->fuel_ = 10.0f;
    5859
    5960        this->setMunitionName("RocketMunition");
     
    6566    RocketFire::~RocketFire()
    6667    {
     68    }
     69
     70    /**
     71    @brief
     72        XMLPort for the RocketFire. You can define the maximum lifetime of the rockets
     73    */
     74    void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     75    {
     76        SUPER(RocketFire, XMLPort, xmlelement, mode);
     77
     78        XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode);
    6779    }
    6880
     
    8597        rocket->setShieldDamage(this->getShieldDamage());
    8698        rocket->setHealthDamage(this->getHealthDamage());
     99        rocket->setMaxFuel(this->fuel_);
    87100    }
    88101}
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.h

    r9667 r10814  
    5454            virtual ~RocketFire();
    5555
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     57
    5658            virtual void fire();
     59            inline void setFuel(float fuel)
     60                { this->fuel_ = fuel; }
     61            inline float getFuel() const
     62                { return this->fuel_; }
    5763
    5864        private:
    5965            float speed_; //!< The speed of the Rocket.
     66            float fuel_; //!< The maximum lifetime of the rocket
    6067    };
    6168}
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/SplitGun.cc

    r10688 r10814  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/XMLPort.h"   
     37#include "core/XMLPort.h"
    3838#include "weaponsystem/Weapon.h"
    3939#include "weaponsystem/WeaponPack.h"
  • code/branches/fabienHS15/src/orxonox/OrxonoxPrereqs.h

    r10624 r10814  
    167167    class DefaultWeaponmodeLink;
    168168    class Munition;
     169    class ReplenishingMunition;
    169170    class Weapon;
    170171    class WeaponMode;
  • code/branches/fabienHS15/src/orxonox/infos/PlayerInfo.cc

    r10624 r10814  
    202202
    203203        this->changedControllableEntity();
     204
     205         // HACK-ish
     206        if(this->isHumanPlayer())
     207            entity->createHud();
    204208    }
    205209
     
    252256        if( !entity || this->previousControllableEntity_.size() == 0 )
    253257            return;
     258
     259        entity->destroyHud(); // HACK-ish
    254260
    255261        this->controllableEntity_->setController(0);
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.cc

    r10791 r10814  
    143143        XMLPortObject(Pawn, Munition, "munition", addMunitionXML, getMunitionXML, xmlelement, mode);
    144144
    145         XMLPortParam(Pawn, "reloadrate", setShieldRechargeRate, getShieldRechargeRate, xmlelement, mode).defaultValues(0);
    146         XMLPortParam(Pawn, "reloadwaittime", setShieldRechargeWaitTime, getShieldRechargeWaitTime, xmlelement, mode).defaultValues(1.0f);
     145        XMLPortParam(Pawn, "shieldrechargerate", setShieldRechargeRate, getShieldRechargeRate, xmlelement, mode).defaultValues(0);
     146        XMLPortParam(Pawn, "shieldrechargewaittime", setShieldRechargeWaitTime, getShieldRechargeWaitTime, xmlelement, mode).defaultValues(1.0f);
    147147
    148148        XMLPortParam(Pawn, "explosionSound",  setExplosionSound,  getExplosionSound,  xmlelement, mode);
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/Pawn.h

    r10791 r10814  
    4646        or below zero. If it is, the pawn gets killed.
    4747
    48         Pawns can carry pickups and fire weapons. The can also have shields.
     48        Pawns can carry pickups and fire weapons. They can also have shields.
    4949
    5050        Notice that every Pawn is a ControllableEntity.
Note: See TracChangeset for help on using the changeset viewer.