[Orxonox-commit 6304] r10961 - in code/branches/presentationHS15: . data/gui/layouts data/gui/scripts data/levels data/levels/includes data/levels/templates data/overlays src/modules/overlays src/modules/overlays/hud src/modules/pickup src/modules/pickup/items src/modules/towerdefense src/modules/weapons src/modules/weapons/munitions src/modules/weapons/projectiles src/modules/weapons/weaponmodes src/orxonox src/orxonox/controllers src/orxonox/infos src/orxonox/overlays src/orxonox/weaponsystem src/orxonox/worldentities src/orxonox/worldentities/pawns
maxima at orxonox.net
maxima at orxonox.net
Wed Dec 9 14:45:58 CET 2015
Author: maxima
Date: 2015-12-09 14:45:58 +0100 (Wed, 09 Dec 2015)
New Revision: 10961
Added:
code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.h
code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.cc
code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.h
code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.cc
code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.h
code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.cc
code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.h
code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.h
code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.h
Removed:
code/branches/presentationHS15/data/levels/includes/towerWeaponSettings.oxi
code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.h
Modified:
code/branches/presentationHS15/
code/branches/presentationHS15/data/gui/layouts/InGameMenu.layout
code/branches/presentationHS15/data/gui/scripts/InGameMenu.lua
code/branches/presentationHS15/data/levels/FPS_Level_HS14.oxw
code/branches/presentationHS15/data/levels/iJohnVane_TriptoArea51.oxw
code/branches/presentationHS15/data/levels/includes/invaderWeapon.oxi
code/branches/presentationHS15/data/levels/includes/invaderWeaponEnemy.oxi
code/branches/presentationHS15/data/levels/includes/pickups.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff2.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsCollateral.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsEscort.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS_HS14.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsFS15.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsGhost.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsH2.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsHXY.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsHeartAttack.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiser.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsImmTest.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsPirate.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsRing.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsSpacecruiser.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsSwallow.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsTransporter.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret1.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsbigship.oxi
code/branches/presentationHS15/data/levels/missionOne.oxw
code/branches/presentationHS15/data/levels/pickups.oxw
code/branches/presentationHS15/data/levels/presentationHS13.oxw
code/branches/presentationHS15/data/levels/shieldTest.oxw
code/branches/presentationHS15/data/levels/templates/HeavyCruiser.oxt
code/branches/presentationHS15/data/levels/templates/HeavyCruiserBody.oxt
code/branches/presentationHS15/data/levels/templates/ModularSpaceShipTest.oxt
code/branches/presentationHS15/data/levels/templates/bigship.oxt
code/branches/presentationHS15/data/levels/templates/enemyInvader.oxt
code/branches/presentationHS15/data/levels/templates/pickupRepresentationTemplates.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipAssff.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipAssff2.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipCollateralDamage.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipDodgeRace.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipEscort.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipGhost.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipHeartAttack.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipInvader.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipPirate.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipRace.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipRing.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipSpacecruiser.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipSwallow.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipTurret.oxt
code/branches/presentationHS15/data/levels/templates/towerdefensetower.oxt
code/branches/presentationHS15/data/levels/towerDefense.oxw
code/branches/presentationHS15/data/overlays/HUDTemplates3.oxo
code/branches/presentationHS15/data/overlays/HoverHUD.oxo
code/branches/presentationHS15/data/overlays/InvaderHUD.oxo
code/branches/presentationHS15/data/overlays/jumpHUD.oxo
code/branches/presentationHS15/src/modules/overlays/CMakeLists.txt
code/branches/presentationHS15/src/modules/overlays/OverlaysPrereqs.h
code/branches/presentationHS15/src/modules/overlays/hud/CMakeLists.txt
code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDBoostBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.h
code/branches/presentationHS15/src/modules/pickup/PickupPrereqs.h
code/branches/presentationHS15/src/modules/pickup/PickupRepresentation.cc
code/branches/presentationHS15/src/modules/pickup/items/CMakeLists.txt
code/branches/presentationHS15/src/modules/pickup/items/DronePickup.h
code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseTower.cc
code/branches/presentationHS15/src/modules/weapons/WeaponsPrereqs.h
code/branches/presentationHS15/src/modules/weapons/munitions/CMakeLists.txt
code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.h
code/branches/presentationHS15/src/modules/weapons/projectiles/BasicProjectile.cc
code/branches/presentationHS15/src/modules/weapons/projectiles/GravityBombField.cc
code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.cc
code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.h
code/branches/presentationHS15/src/modules/weapons/projectiles/SimpleRocket.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/EnergyDrink.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/FusionFire.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/GravityBombFire.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/HsW01.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/LaserFire.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/LightningGun.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.h
code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFireOld.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.cc
code/branches/presentationHS15/src/orxonox/OrxonoxPrereqs.h
code/branches/presentationHS15/src/orxonox/controllers/HumanController.cc
code/branches/presentationHS15/src/orxonox/infos/PlayerInfo.cc
code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.cc
code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.h
code/branches/presentationHS15/src/orxonox/weaponsystem/CMakeLists.txt
code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.h
code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.h
code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.h
code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.h
code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.h
code/branches/presentationHS15/src/orxonox/worldentities/MobileEntity.h
code/branches/presentationHS15/src/orxonox/worldentities/StaticEntity.h
code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.cc
code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h
code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.cc
code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.h
Log:
Merged presentation and fabiens branch. Had to modify hoverHUD and invaderHUD, because the text of the healthbar wasn't correctly displayed and the weapon settings of the hovership.
Property changes on: code/branches/presentationHS15
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/clangenb:10385-10609
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/pickupsFS14:10000-10259
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/sfxThilo:9691-9917
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
+ /code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/clangenb:10385-10609
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/fabienHS15:10685-10960
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/pickupsFS14:10000-10259
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/sfxThilo:9691-9917
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
Modified: code/branches/presentationHS15/data/gui/layouts/InGameMenu.layout
===================================================================
--- code/branches/presentationHS15/data/gui/layouts/InGameMenu.layout 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/gui/layouts/InGameMenu.layout 2015-12-09 13:45:58 UTC (rev 10961)
@@ -8,28 +8,35 @@
<Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_ReturnButton" >
<Property Name="Text" Value="Return to Game" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
<Property Name="Alpha" Value="0.9" />
<Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
</Window>
+ <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_ReloadLevelButton" >
+ <Property Name="Text" Value="Reload level" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
+ <Property Name="Alpha" Value="0.9" />
+ <Event Name="Clicked" Function="InGameMenu.button_reloadLevel_clicked"/>
+ </Window>
<Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_MainMenuButton" >
<Property Name="Text" Value="Main Menu" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4625,0},{0.6,0},{0.5125,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
<Property Name="Alpha" Value="0.9" />
<Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_SettingsButton" >
<Property Name="Text" Value="Settings" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5625,0},{0.6,0},{0.6125,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
<Property Name="Alpha" Value="0.9" />
<Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_QuitButton" >
<Property Name="Text" Value="Quit" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5875,0},{0.6,0},{0.6375,0}}" />
<Property Name="Alpha" Value="0.9" />
<Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/>
</Window>
Modified: code/branches/presentationHS15/data/gui/scripts/InGameMenu.lua
===================================================================
--- code/branches/presentationHS15/data/gui/scripts/InGameMenu.lua 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/gui/scripts/InGameMenu.lua 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,23 +6,28 @@
function P.onLoad()
P.multiplayerMode = "startClient"
- --button are arranged in a 4x1 matrix, the left lower item is nil
+ --button are arranged in a 5x1 matrix, the left lower item is nil
P:setButton(1, 1, {
["button"] = winMgr:getWindow("orxonox/InGameMenu_ReturnButton"),
["callback"] = P.button_return_clicked
})
P:setButton(2, 1, {
+ ["button"] = winMgr:getWindow("orxonox/InGameMenu_ReloadLevelButton"),
+ ["callback"] = P.button_reloadLevel_clicked
+ })
+
+ P:setButton(3, 1, {
["button"] = winMgr:getWindow("orxonox/InGameMenu_MainMenuButton"),
["callback"] = P.button_mainmenu_clicked
})
- P:setButton(3, 1, {
+ P:setButton(4, 1, {
["button"] = winMgr:getWindow("orxonox/InGameMenu_SettingsButton"),
["callback"] = P.button_settings_clicked
})
- P:setButton(4, 1, {
+ P:setButton(5, 1, {
["button"] = winMgr:getWindow("orxonox/InGameMenu_QuitButton"),
["callback"] = P.button_quit_clicked
})
@@ -53,6 +58,11 @@
showMenuSheet("SettingsMenu", true)
end
+function P.button_reloadLevel_clicked(e)
+ hideMenuSheet("InGameMenu")
+ orxonox.execute("reloadLevel")
+end
+
function P.button_return_clicked(e)
hideMenuSheet("InGameMenu")
end
Modified: code/branches/presentationHS15/data/levels/FPS_Level_HS14.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/FPS_Level_HS14.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/FPS_Level_HS14.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -66,8 +66,8 @@
initialshieldhealth = "50"
maxshieldhealth = "50"
shieldabsorption = "0.8"
- reloadrate = "100"
- reloadwaittime = "0.1"
+ shieldrechargerate = "100"
+ shieldrechargewaittime = "0.1"
name = "Tanis1"
radarname = "Light Destroyer" >
<attached>
@@ -196,8 +196,8 @@
initialshieldhealth = "200"
maxshieldhealth = "200"
shieldabsorption = "0.8"
- reloadrate = "1"
- reloadwaittime = "1"
+ shieldrechargerate = "1"
+ shieldrechargewaittime = "1"
name = "Tanis0"
radarname = "Tanis big ship" >
</SpaceShip>
@@ -215,8 +215,8 @@
initialshieldhealth = "50"
maxshieldhealth = "50"
shieldabsorption = "0.8"
- reloadrate = "1"
- reloadwaittime = "1"
+ shieldrechargerate = "1"
+ shieldrechargewaittime = "1"
name = "Tanis0"
radarname = "Pirate1" >
@@ -238,8 +238,8 @@
initialshieldhealth = "50"
maxshieldhealth = "50"
shieldabsorption = "0.8"
- reloadrate = "1"
- reloadwaittime = "1"
+ shieldrechargerate = "1"
+ shieldrechargewaittime = "1"
name = "Tanis0"
radarname = "Pirate2" >
Modified: code/branches/presentationHS15/data/levels/iJohnVane_TriptoArea51.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/iJohnVane_TriptoArea51.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/iJohnVane_TriptoArea51.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -168,8 +168,8 @@
initialshieldhealth = "80"
maxshieldhealth = "120"
shieldabsorption = "0.8"
- reloadrate = "1"
- reloadwaittime = "1"
+ shieldrechargerate = "1"
+ shieldrechargewaittime = "1"
name = "cruiser"
radarname = "Spacecruiser" >
<attached>
Modified: code/branches/presentationHS15/data/levels/includes/invaderWeapon.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/invaderWeapon.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/invaderWeapon.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,7 +6,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -24,4 +24,7 @@
<DefaultWeaponmodeLink firemode=1 weaponmode=0 />
</links>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/invaderWeaponEnemy.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/invaderWeaponEnemy.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/invaderWeaponEnemy.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,7 +6,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -24,4 +24,7 @@
<DefaultWeaponmodeLink firemode=1 weaponmode=0 />
</links>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/pickups.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/pickups.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/pickups.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -77,6 +77,22 @@
inventoryRepresentation = "dropPickup"
/>
+<PickupRepresentation
+ name = "destroy"
+ pickupName = "Destroy Pickup"
+ pickupDescription = "Destroy all pickups you have."
+ spawnerTemplate = "destroypickupRepresentation"
+ inventoryRepresentation = "detroyPickup"
+/>
+
+<PickupRepresentation
+ name = "destroycarrier"
+ pickupName = "Destroy Carrier Pickup"
+ pickupDescription = "destroys you."
+ spawnerTemplate = "destroycarrierpickupRepresentation"
+ inventoryRepresentation = "destroyCarrierPickup"
+/>
+
<!-- Speed pickups -->
<PickupRepresentation
@@ -137,6 +153,32 @@
inventoryRepresentation = "HugeInvisible"
/>
+<!-- Munition pickups -->
+
+<PickupRepresentation
+ name = "smallmunitionpickup"
+ pickupName = "Small munition"
+ pickupDescription = "Gives a small amount of munition."
+ spawnerTemplate = "smallmunitionpickupRepresentation"
+ inventoryRepresentation = "SmallMunition"
+/>
+
+<PickupRepresentation
+ name = "mediummunitionpickup"
+ pickupName = "Medium munition"
+ pickupDescription = "Gives a medium amount of munition."
+ spawnerTemplate = "mediummunitionpickupRepresentation"
+ inventoryRepresentation = "MediumMunition"
+/>
+
+<PickupRepresentation
+ name = "hugemunitionpickup"
+ pickupName = "Huge munition"
+ pickupDescription = "Gives a huge amount of munition."
+ spawnerTemplate = "hugemunitionpickupRepresentation"
+ inventoryRepresentation = "HugeMunition"
+/>
+
<!-- Pickup Collection pickups -->
<PickupRepresentation
@@ -174,11 +216,11 @@
/>
<PickupRepresentation
- name = "largedamageboostpickup"
- pickupName = "Large DamageBoost Pickup"
+ name = "hugedamageboostpickup"
+ pickupName = "Huge DamageBoost Pickup"
pickupDescription = "Multiplies the ship damage with 7."
- spawnerTemplate = "largedamageboostpickupRepresentation"
- inventoryRepresentation = "LargeDamageBoost"
+ spawnerTemplate = "hugedamageboostpickupRepresentation"
+ inventoryRepresentation = "HugeDamageBoost"
/>
<!-- Shrink Pickup -->
@@ -206,3 +248,29 @@
spawnerTemplate = "hugeshrinkpickupRepresentation"
inventoryRepresentation = "HugeShrink"
/>
+
+<!-- Boost Pickup -->
+
+<PickupRepresentation
+ name = "smallboostpickup"
+ pickupName = "Small Boost"
+ pickupDescription = "Restores the boost by a bit"
+ spawnerTemplate = "smallboostpickupRepresentation"
+ inventoryRepresentation = "SmallBoost"
+/>
+
+<PickupRepresentation
+ name = "mediumboostpickup"
+ pickupName = "Medium Boost"
+ pickupDescription = "Restores the boost"
+ spawnerTemplate = "mediumboostpickupRepresentation"
+ inventoryRepresentation = "MediumBoost"
+/>
+
+<PickupRepresentation
+ name = "hugeboostpickup"
+ pickupName = "Huge Boost"
+ pickupDescription = "Restores the boost considerably"
+ spawnerTemplate = "hugeboostpickupRepresentation"
+ inventoryRepresentation = "HugeBoost"
+/>
Deleted: code/branches/presentationHS15/data/levels/includes/towerWeaponSettings.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/towerWeaponSettings.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/towerWeaponSettings.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,55 +0,0 @@
- <weaponslots>
- <WeaponSlot position="-15.0,-1.5,0" />
- <WeaponSlot position=" 15.0,-1.5,0" />
- <WeaponSlot position=" 0, 0,0" />
- </weaponslots>
- <weaponsets>
- <WeaponSet firemode=0 />
- <WeaponSet firemode=1 />
- <WeaponSet firemode=2 />
- <WeaponSet firemode=3 />
- </weaponsets>
- <weapons>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
- <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
- <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
- <DefaultWeaponmodeLink firemode=3 weaponmode=3 />
- </links>
- <Weapon>
- <attached>
- <Model mesh="LightningGun.mesh" pitch="100" roll="90" yaw="90" position="0,-1.3,200" scale=1/>
- <Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,200" scale=1 />
- <Model mesh="hs-w01_reduced.mesh" roll="45" pitch="-76" yaw="-45" position="-1.5,1,200" scale=10 />
- </attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.005 damage=31.4159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=314.159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
- <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
- </Weapon>
-
- <Weapon>
- <attached>
- <Model mesh="LightningGun.mesh" pitch="103" roll="90" yaw="90" position="0,-1.35,0" />
- <Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
- <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
- </attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
- <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
- </Weapon>
- <Weapon>
- <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
- </Weapon>
-
- </WeaponPack>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
- </links>
- <!--Weapon>
- <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
- </Weapon-->
- </WeaponPack>
- </weapons>
\ No newline at end of file
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -9,7 +9,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -23,8 +23,8 @@
<Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
@@ -33,13 +33,18 @@
<Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=8 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=2 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff2.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff2.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsAssff2.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -8,8 +8,8 @@
<WeaponSet firemode=1 />
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
- </weaponsets>
- <weapons>
+ </weaponsets>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -22,8 +22,8 @@
<Model mesh="stunweapon.mesh" pitch="180" roll="0" yaw="0" position="-1.9,-.5,1" scale=".5" />
<BlinkingBillboard position="-1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 healthamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 healthamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
<LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" shielddamage=23 />
</Weapon>
<Weapon>
@@ -31,13 +31,18 @@
<Model mesh="stunweapon.mesh" pitch="180" roll="0" yaw="0" position="1.9,-.5,1" scale=".5"/>
<BlinkingBillboard position="1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6,1.3,-2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1,1.6,-2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6,1.3,-2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1,1.6,-2.0" />
<LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" shielddamage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 fuel=10 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsCollateral.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsCollateral.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsCollateral.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -9,7 +9,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -24,9 +24,9 @@
<!--Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" /--> <!-- THING BETWEEN -->
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="90" yaw="-90" position="-1.5, 1, -0.3" scale=0.6 /> <!-- MACHINE GUN -->
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
- <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
@@ -35,13 +35,18 @@
<!--Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" /-->
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="90" yaw="-90" position="1.8, 1, -0.3" scale=0.6 /> <!-- MACHINE GUN -->
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsEscort.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsEscort.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsEscort.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,19 +6,17 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
<DefaultWeaponmodeLink firemode=1 weaponmode=1 />
</links>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
- <!--HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" projectileMesh="LaserBeam2.mesh" /-->
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
</Weapon>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
- <!--HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" projectileMesh="LaserBeam2.mesh" /-->
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
</Weapon>
</WeaponPack>
<WeaponPack>
@@ -26,4 +24,7 @@
<DefaultWeaponmodeLink firemode=1 weaponmode=0 />
</links>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -10,7 +10,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack firemode=0>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -48,4 +48,8 @@
unlimitedMunition=true
/-->
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=5 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=8 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS_HS14.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS_HS14.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsFPS_HS14.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -10,7 +10,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack firemode=0>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -48,4 +48,8 @@
unlimitedMunition=true
/-->
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=5 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=8 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsFS15.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsFS15.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsFS15.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -11,7 +11,7 @@
<WeaponSet firemode=3 />
<WeaponSet firemode=4 />
</weaponsets>
-<weapons>
+<weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -37,7 +37,7 @@
<LaserFire mode=1 munitionpershot=0 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
<GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
<RocketFireOld mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
- <RocketFire mode=4 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=4 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
</Weapon>
</WeaponPack>
<WeaponPack>
@@ -48,4 +48,10 @@
<EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
</Weapon-->
</WeaponPack>
-</weapons>
\ No newline at end of file
+</weaponpacks>
+<munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ <GravityBombMunition initialmagazines=3 maxmagazines=3 munitionpermagazine=1 />
+</munition>
\ No newline at end of file
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsGhost.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsGhost.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsGhost.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -10,7 +10,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=2 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -18,20 +18,25 @@
<DefaultWeaponmodeLink firemode=2 weaponmode=2 />
</links>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 healthdamage=3.14159 delay=0 material="Flares/point_lensflare" />
- <HsW01 mode=0 munitionpershot=0 healthdamage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
+ <HsW01 mode=0 munitionpershot=1 healthdamage=3.14159 delay=0 material="Flares/point_lensflare" />
+ <HsW01 mode=0 munitionpershot=1 healthdamage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=30 shielddamage=10 />
</Weapon>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 damage=3.14159 delay=0 material="Flares/point_lensflare" />
- <HsW01 mode=0 munitionpershot=0 damage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
+ <HsW01 mode=0 munitionpershot=1 damage=3.14159 delay=0 material="Flares/point_lensflare" />
+ <HsW01 mode=0 munitionpershot=1 damage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=30 shielddamage=10 />
</Weapon>
<Weapon>
- <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
+ <SimpleRocketFire mode=2 munitionpershot=1 muzzleoffset="0,0,0" damage=50 />
</Weapon>
<Weapon>
- <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 delay=0.1 />
+ <SimpleRocketFire mode=2 munitionpershot=1 muzzleoffset="0,0,0" damage=50 delay=0.1 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsH2.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsH2.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsH2.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -7,7 +7,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -17,16 +17,16 @@
<Model mesh="hs-w01.mesh" roll="180" position="0.0, 0.5, 0.0" scale=2 />
<Model mesh="hs-w01s.mesh" roll="180" position="0.1, 0.0, 0.0" scale=2 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9,-4" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9,-4" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9,-4" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9,-4" />
</Weapon>
<Weapon>
<attached>
<Model mesh="hs-w01.mesh" roll="180" position=" 0.0, 0.5, 0.0" scale=2 />
<Model mesh="hs-w01s.mesh" roll="180" position="-0.1, 0.0, 0.0" scale=2 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9, -4.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9, -4.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9, -4.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9, -4.0" />
</Weapon>
</WeaponPack>
<WeaponPack>
@@ -41,5 +41,8 @@
<LightningGun mode=0 muzzleoffset="0,0,0" />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=10 maxmagazines=10 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsHXY.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsHXY.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsHXY.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,7 +6,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -23,4 +23,8 @@
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20/>
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=10 maxmagazines=10 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsHeartAttack.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsHeartAttack.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsHeartAttack.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -10,7 +10,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -19,32 +19,30 @@
<DefaultWeaponmodeLink firemode=3 weaponmode=3 />
</links>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
</Weapon>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
</Weapon>
<Weapon>
- <LaserFire mode=1 munitionpershot=0 muzzleoffset="2.2,6,16" damage=30 shielddamage=20 />
- <LaserFire mode=1 munitionpershot=0 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <LaserFire mode=1 munitionpershot=1 muzzleoffset="2.2,6,16" damage=30 shielddamage=20 />
+ <LaserFire mode=1 munitionpershot=1 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
<GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
</Weapon>
<Weapon>
</Weapon>
</WeaponPack>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
- </links>
- <!--Weapon>
- <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
- </Weapon-->
- </WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=6.0/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=1 />
+ <GravityBombMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiser.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiser.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiser.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -9,7 +9,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -23,8 +23,8 @@
<Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
@@ -33,21 +33,18 @@
<Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,-10" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,-10.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
</Weapon>
</WeaponPack>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
- </links>
- <!--Weapon>
- <EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
- </Weapon-->
- </WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=5.0/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -9,7 +9,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -20,20 +20,20 @@
<Weapon>
<attached>
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
<attached>
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
</Weapon>
</WeaponPack>
<WeaponPack>
@@ -44,4 +44,9 @@
<EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
</Weapon-->
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.0/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,7 +6,7 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
-<weapons>
+<weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -24,4 +24,7 @@
<DefaultWeaponmodeLink firemode=1 weaponmode=0 />
</links>
</WeaponPack>
-</weapons>
+</weaponpacks>
+<munition>
+ <IceMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+</munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsImmTest.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsImmTest.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsImmTest.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -9,7 +9,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -43,7 +43,7 @@
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" shielddamage=50 />
- <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 fuel=10 />
</Weapon>
</WeaponPack>
<WeaponPack>
@@ -54,4 +54,9 @@
<EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
</Weapon-->
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.0/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsPirate.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsPirate.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsPirate.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,19 +6,22 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
<DefaultWeaponmodeLink firemode=1 weaponmode=1 />
</links>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=2.5 material="Flares/point_lensflare" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=2.5 material="Flares/point_lensflare" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
</Weapon>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=2.5 material="Flares/point_lensflare" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=2.5 material="Flares/point_lensflare" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.0/>
+ </munition>
\ No newline at end of file
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsRing.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsRing.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsRing.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,26 +1,35 @@
-<weaponslots>
- <WeaponSlot position="11,0,-7" />
- <WeaponSlot position="0,0,-7" />
- <WeaponSlot position="-11,0,-7" />
-</weaponslots>
-<weaponsets>
- <WeaponSet firemode=0 />
- <WeaponSet firemode=1 />
-</weaponsets>
-<weapons>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
- <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
- </links>
- <Weapon>
- <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset="11,0,-3" freezefactor=0.5 freezetime=2.0 />
- </Weapon>
- <Weapon>
- <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset=" -11,0,-3" freezefactor=0.5 freezetime=2.0 />
- </Weapon>
- <Weapon>
- <GravityBombFire mode=1 munitionpershot=0 delay=0.125 damage=3 muzzleoffset="0,0,-7"/>
- </Weapon>
- </WeaponPack>
-</weapons>
+ <weaponslots>
+ <WeaponSlot position="11,0,-7" />
+ <WeaponSlot position="-11,0,-7" />
+ <WeaponSlot position="0,0,-7" />
+ </weaponslots>
+ <weaponsets>
+ <WeaponSet firemode=0 />
+ <WeaponSet firemode=1 />
+ <WeaponSet firemode=2 />
+ </weaponsets>
+ <weaponpacks>
+ <WeaponPack>
+ <links>
+ <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+ <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+ <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+ </links>
+ <Weapon>
+ <LaserFire mode=0 munitionpershot=1 damage=10 shielddamage=5 />
+ <IceGun mode=1 munitionpershot=1 delay=0.125 damage=9.3 muzzleoffset="11,0,-3" freezefactor=0.5 freezetime=2.0 />
+ </Weapon>
+ <Weapon>
+ <LaserFire mode=0 munitionpershot=1 damage=10 shielddamage=5 />
+ <IceGun mode=1 munitionpershot=1 delay=0.125 damage=9.3 muzzleoffset=" -11,0,-3" freezefactor=0.5 freezetime=2.0 />
+ </Weapon>
+ <Weapon>
+ <GravityBombFire mode=2 munitionpershot=1 delay=0.125 damage=3 muzzleoffset="0,0,-7"/>
+ </Weapon>
+ </WeaponPack>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <GravityBombMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=1 />
+ <IceMunition initialmagazines=16 maxmagazines=16 munitionpermagazine=1 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsSpacecruiser.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsSpacecruiser.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsSpacecruiser.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -13,7 +13,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -27,8 +27,8 @@
<Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
@@ -37,13 +37,13 @@
<Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
</Weapon>
<Weapon>
<attached>
@@ -51,8 +51,8 @@
<Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
@@ -61,8 +61,8 @@
<Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
@@ -71,8 +71,8 @@
<Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
@@ -81,9 +81,14 @@
<Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
<Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
\ No newline at end of file
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsSwallow.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsSwallow.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsSwallow.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,22 +1,29 @@
<weaponslots>
<WeaponSlot position=" 8,1.66,-17.5" />
<WeaponSlot position="-8,1.66,-17.5" />
+ <WeaponSlot position="0,1.66,-17.5" />
</weaponslots>
<weaponsets>
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
<DefaultWeaponmodeLink firemode=1 weaponmode=1 />
</links>
<Weapon>
- <SplitGun mode=0 munitionpershot=0 damage=6.0 muzzleoffset="0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
+ <SplitGun mode=0 munitionpershot=1 damage=6.0 muzzleoffset="0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
+ <LaserFire mode=1 munitionpershot=1 damage=10.0 muzzleoffset="0.5,0.6,1.7" />
</Weapon>
<Weapon>
- <SplitGun mode=0 munitionpershot=0 damage=6.0 muzzleoffset="-0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
- </Weapon>
+ <SplitGun mode=0 munitionpershot=1 damage=6.0 muzzleoffset="-0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
+ <LaserFire mode=1 munitionpershot=1 damage=10.0 muzzleoffset="-0.5,0.6,1.7" />
+ </Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <SplitMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsTransporter.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsTransporter.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsTransporter.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,21 +6,25 @@
<WeaponSet firemode=0 />
<WeaponSet firemode=1 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
<DefaultWeaponmodeLink firemode=1 weaponmode=1 />
</links>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0.1 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.1 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0.1 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.1 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -4,7 +4,7 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -19,4 +19,7 @@
<HsW01 mode=0 munitionpershot=0 delay=0 damage=1 material="Flares/point_lensflare" muzzleoffset="-1.7, -1.7,-30" />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ </munition>
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret1.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret1.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsTurret1.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -4,7 +4,7 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -19,4 +19,7 @@
<HsW01 mode=0 munitionpershot=0 delay=0 damage=20 material="Flares/point_lensflare" muzzleoffset="-1.7, -1.7,-30" />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ </munition>
\ No newline at end of file
Modified: code/branches/presentationHS15/data/levels/includes/weaponSettingsbigship.oxi
===================================================================
--- code/branches/presentationHS15/data/levels/includes/weaponSettingsbigship.oxi 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/includes/weaponSettingsbigship.oxi 2015-12-09 13:45:58 UTC (rev 10961)
@@ -9,7 +9,7 @@
<WeaponSet firemode=2 />
<WeaponSet firemode=3 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -20,21 +20,21 @@
<Weapon>
<attached>
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
<attached>
</attached>
- <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
- <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+ <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
<LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
</Weapon>
<Weapon>
<SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
</Weapon>
</WeaponPack>
<WeaponPack>
@@ -45,4 +45,9 @@
<EnergyDrink mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
</Weapon-->
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+ <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+ <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+ </munition>
\ No newline at end of file
Modified: code/branches/presentationHS15/data/levels/missionOne.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/missionOne.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/missionOne.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1079,8 +1079,8 @@
initialshieldhealth = "80"
maxshieldhealth = "120"
shieldabsorption = "0.8"
- reloadrate = "1"
- reloadwaittime = "1"
+ shieldrechargerate = "1"
+ shieldrechargewaittime = "1"
name = "cruiser"
radarname = "Spacecruiser" >
<attached>
Modified: code/branches/presentationHS15/data/levels/pickups.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/pickups.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/pickups.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -35,6 +35,30 @@
<Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
<SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+ <!-- Boost pickup -->
+
+ <PickupSpawner pickup=smallboostpickup position="-25,-125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+ <PickupSpawner pickup=mediumboostpickup position="0,-125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+ <PickupSpawner pickup=hugeboostpickup position="25,-125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+
+ <!-- DamageBoost pickup -->
+
+ <PickupSpawner pickup=smalldamageboostpickup position="-25,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+ <PickupSpawner pickup=mediumdamageboostpickup position="0,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+ <PickupSpawner pickup=hugedamageboostpickup position="25,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+
+ <!-- Munition pickups -->
+
+ <PickupSpawner pickup=smallmunitionpickup position="-25,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+ <PickupSpawner pickup=mediummunitionpickup position="0,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+ <PickupSpawner pickup=hugemunitionpickup position="25,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+
+ <!-- Shrink pickup -->
+
+ <PickupSpawner pickup=smallshrinkpickup position="-25,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
+ <PickupSpawner pickup=mediumshrinkpickup position="0,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
+ <PickupSpawner pickup=hugeshrinkpickup position="25,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
+
<!-- Shield pickups -->
<PickupSpawner pickup=smallshieldpickup position="-25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
@@ -62,23 +86,7 @@
<PickupSpawner pickup=hugeinvisiblepickup position="25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
<!-- Meta pickups -->
-
- <Template name=usemetapickup baseclass=MetaPickup>
- <MetaPickup representation="use" metaType="use" />
- </Template>
- <Template name=dropmetapickup baseclass=MetaPickup>
- <MetaPickup representation="drop" metaType="drop" />
- </Template>
-
- <Template name=destroymetapickup baseclass=MetaPickup>
- <MetaPickup metaType="destroy" />
- </Template>
-
- <Template name=destroycarriermetapickup baseclass=MetaPickup>
- <MetaPickup metaType="destroyCarrier" />
- </Template>
-
<PickupSpawner pickup=usemetapickup position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
<PickupSpawner pickup=dropmetapickup position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
<PickupSpawner pickup=destroymetapickup position="25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
@@ -90,34 +98,24 @@
<!-- Drone pickup -->
- <PickupSpawner pickup=dronepickup position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+ <PickupSpawner pickup=dronepickup position="-25,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
- <!-- DamageBoost pickup -->
-
- <PickupSpawner pickup=smalldamageboostpickup position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
- <PickupSpawner pickup=mediumdamageboostpickup position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
- <PickupSpawner pickup=largedamageboostpickup position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
-
<!-- Other pickups -->
<!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
<PickupRepresentation
- name = "MediumHealth"
- pickupName = "Medium Health Pack"
- pickupDescription = "Once used adds a medium amout of health to the ship."
+ name = "ContinousHealth"
+ pickupName = "Continous Health Pack"
+ pickupDescription = "While useing adds a medium amout of health to the ship."
spawnerTemplate = "mediumhealthpickupRepresentation"
inventoryRepresentation = "MediumHealth"
/>
<Template name=continuoushealthpickup baseclass=HealthPickup>
- <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
+ <HealthPickup representation="ContinousHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
</Template>
<PickupSpawner pickup=continuoushealthpickup position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
-
- <PickupSpawner pickup="smallshrinkpickup" position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
- <PickupSpawner pickup="mediumshrinkpickup" position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
- <PickupSpawner pickup="hugeshrinkpickup" position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
<!-- @Objects: 4 boxes (uncontrolled pawns) -->
<Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
@@ -176,14 +174,5 @@
</collisionShapes>
</Pawn>
- <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 >
- <attached>
- <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="10,10,10" />
- </collisionShapes>
- </StaticEntity-->
-
</Scene>
</Level>
Modified: code/branches/presentationHS15/data/levels/presentationHS13.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/presentationHS13.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/presentationHS13.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -161,8 +161,8 @@
initialshieldhealth = "80"
maxshieldhealth = "120"
shieldabsorption = "0.8"
- reloadrate = "1"
- reloadwaittime = "1"
+ shieldrechargerate = "1"
+ shieldrechargewaittime = "1"
name = "Tanis1"
radarname = "Tanis Cruiser" >
<attached>
Modified: code/branches/presentationHS15/data/levels/shieldTest.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/shieldTest.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/shieldTest.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -42,8 +42,8 @@
shieldabsorption= 1
- reloadrate= "10"
- reloadwaittime= 1
+ shieldrechargerate = "10"
+ shieldrechargewaittime = 1
>
<attached>
Modified: code/branches/presentationHS15/data/levels/templates/HeavyCruiser.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/HeavyCruiser.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/HeavyCruiser.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -18,8 +18,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 300
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/HeavyCruiserBody.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/HeavyCruiserBody.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/HeavyCruiserBody.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -16,8 +16,8 @@
initialshieldhealth = 300
maxshieldhealth = 500
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 300
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/ModularSpaceShipTest.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/ModularSpaceShipTest.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/ModularSpaceShipTest.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/bigship.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/bigship.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/bigship.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 30
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/enemyInvader.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/enemyInvader.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/enemyInvader.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 10
maxshieldhealth = 10
shieldabsorption = 0.9
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 150
auxilaryThrust = 30
@@ -76,8 +76,8 @@
initialshieldhealth = 20
maxshieldhealth = 20
shieldabsorption = 0.9
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 150
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/pickupRepresentationTemplates.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/pickupRepresentationTemplates.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/pickupRepresentationTemplates.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,3 +1,80 @@
+<!-- Boost pickups: -->
+
+<Template name=smallboostpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Flash" scale=0.3 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smallboostpickup baseclass=BoostPickup>
+ <BoostPickup
+ representation = "smallboostpickup"
+ boostrefill = 0.5
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=mediumboostpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Flash" scale=0.5 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=mediumboostpickup baseclass=BoostPickup>
+ <BoostPickup
+ representation = "mediumboostpickup"
+ boostrefill = 0.75
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=hugeboostpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Flash" scale=0.7 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=hugeboostpickup baseclass=BoostPickup>
+ <BoostPickup
+ representation = "hugeboostpickup"
+ boostrefill = 1.0
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
<!-- Shield pickups: -->
<Template name=smallshieldpickupRepresentation>
@@ -188,6 +265,103 @@
/>
</Template>
+<!-- Munition pickups: -->
+
+<Template name=smallmunitionpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.3 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smallmunitionpickup baseclass=MunitionPickup>
+ <MunitionPickup
+ representation = "smallmunitionpickup"
+ activationType = "immediate"
+ durationType = "once"
+ >
+ <munitioncontainers>
+ <MunitionContainer munitiontype="LaserMunition" munitionamount=16 magazinesamount=0 />
+ <MunitionContainer munitiontype="FusionMunition" munitionamount=8 magazinesamount=0 />
+ <MunitionContainer munitiontype="LightningMunition" munitionamount=8 magazinesamount=0 />
+ </munitioncontainers>
+ </MunitionPickup>
+</Template>
+
+<Template name=mediummunitionpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.5 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=mediummunitionpickup baseclass=MunitionPickup>
+ <MunitionPickup
+ representation = "mediummunitionpickup"
+ activationType = "immediate"
+ durationType = "once"
+ >
+ <munitioncontainers>
+ <MunitionContainer munitiontype="LaserMunition" munitionamount=32 magazinesamount=0 />
+ <MunitionContainer munitiontype="FusionMunition" munitionamount=16 magazinesamount=0 />
+ <MunitionContainer munitiontype="LightningMunition" munitionamount=16 magazinesamount=0 />
+ <MunitionContainer munitiontype="SplitMunition" munitionamount=8 magazinesamount=0 />
+ <MunitionContainer munitiontype="RocketMunition" munitionamount=0 magazinesamount=2 />
+ </munitioncontainers>
+ </MunitionPickup></Template>
+
+<Template name=hugemunitionpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.7 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=hugemunitionpickup baseclass=MunitionPickup>
+ <MunitionPickup
+ representation = "hugemunitionpickup"
+ activationType = "immediate"
+ durationType = "once"
+ >
+ <munitioncontainers>
+ <MunitionContainer munitiontype="LaserMunition" munitionamount=64 magazinesamount=0 />
+ <MunitionContainer munitiontype="FusionMunition" munitionamount=32 magazinesamount=0 />
+ <MunitionContainer munitiontype="LightningMunition" munitionamount=32 magazinesamount=0 />
+ <MunitionContainer munitiontype="SplitMunition" munitionamount=16 magazinesamount=0 />
+ <MunitionContainer munitiontype="RocketMunition" munitionamount=0 magazinesamount=10 />
+ <MunitionContainer munitiontype="IceMunition" munitionamount=0 magazinesamount=10 />
+ <MunitionContainer munitiontype="GravityBombMunition" munitionamount=0 magazinesamount=10 />
+ </munitioncontainers>
+ </MunitionPickup>
+</Template>
+
<!-- Meta pickups: -->
<Template name=usepickupRepresentation>
@@ -195,9 +369,9 @@
<spawner-representation>
<StaticEntity>
<attached>
- <Billboard position="0,0,0" colour="0.60,0.97,0.23" material="Sphere2" scale=0.1>
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
<attached>
- <Billboard position="0,0,0" colour="0.40,0.81,0.10" material="Arrow" scale=0.65 />
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="ArrowUp" scale=0.65 />
</attached>
</Billboard>
</attached>
@@ -206,14 +380,18 @@
</PickupRepresentation>
</Template>
+<Template name=usemetapickup baseclass=MetaPickup>
+ <MetaPickup representation="use" metaType="use" />
+</Template>
+
<Template name=droppickupRepresentation>
<PickupRepresentation>
<spawner-representation>
<StaticEntity>
<attached>
- <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1>
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
<attached>
- <Billboard position="0,0,0" colour="0.95,0.20,0.10" material="Arrow" scale=0.65 />
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="ArrowDown" scale=0.65 />
</attached>
</Billboard>
</attached>
@@ -222,6 +400,50 @@
</PickupRepresentation>
</Template>
+<Template name=dropmetapickup baseclass=MetaPickup>
+ <MetaPickup representation="drop" metaType="drop" />
+</Template>
+
+<Template name=destroypickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Splash" scale=0.65 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=destroymetapickup baseclass=MetaPickup>
+ <MetaPickup representation="destroy" metaType="destroy" />
+</Template>
+
+<Template name=destroycarrierpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Asterisk" scale=0.65 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=destroycarriermetapickup baseclass=MetaPickup>
+ <MetaPickup representation="destroycarrier" metaType="destroyCarrier" />
+</Template>
+
<!-- DamageBoost pickups -->
<Template name=smalldamageboostpickupRepresentation>
@@ -231,7 +453,7 @@
<attached>
<Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
<attached>
- <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageSmall" scale=0.7 />
+ <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.3 />
</attached>
</Billboard>
</attached>
@@ -257,7 +479,7 @@
<attached>
<Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
<attached>
- <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageMedium" scale=0.7 />
+ <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.5 />
</attached>
</Billboard>
</attached>
@@ -276,14 +498,14 @@
/>
</Template>
-<Template name=largedamageboostpickupRepresentation>
+<Template name=hugedamageboostpickupRepresentation>
<PickupRepresentation>
<spawner-representation>
<StaticEntity>
<attached>
<Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
<attached>
- <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageLarge" scale=0.7 />
+ <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.7 />
</attached>
</Billboard>
</attached>
@@ -292,9 +514,9 @@
</PickupRepresentation>
</Template>
-<Template name=largedamageboostpickup baseclass=DamageBoostPickup>
+<Template name=hugedamageboostpickup baseclass=DamageBoostPickup>
<DamageBoostPickup
- representation = "largedamageboostpickup"
+ representation = "hugedamageboostpickup"
duration = 10.0
damageMultiplier = 7.0
activationType = "immediate"
@@ -497,7 +719,7 @@
<attached>
<Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
<attached>
- <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.4 />
+ <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.35 />
</attached>
</Billboard>
</attached>
@@ -523,7 +745,7 @@
<attached>
<Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
<attached>
- <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.7 />
+ <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.55 />
</attached>
</Billboard>
</attached>
@@ -549,7 +771,7 @@
<attached>
<Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
<attached>
- <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=1.0 />
+ <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.75 />
</attached>
</Billboard>
</attached>
@@ -608,15 +830,15 @@
<Model scale="1" mesh="drone.mesh"/>
</attached>
<collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="1, 1, 1" />
+ <SphereCollisionShape position="0,0,0" radius=5 />
</collisionShapes>
<weaponslots>
- <WeaponSlot position=" 0, 0,0" />
+ <WeaponSlot position="0,0,0" />
</weaponslots>
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -630,7 +852,10 @@
<HsW01 mode=0 munitionpershot=0 delay=0 damage=1.5708 material="Flares/point_lensflare" muzzleoffset="-0.9, 1.1,-4" />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+ </munition>
</Drone>
</Template>
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipAssff.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipAssff.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipAssff.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipAssff2.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipAssff2.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipAssff2.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 130
maxshieldhealth = 150
shieldabsorption = 0.95
- reloadrate = 5
- reloadwaittime = 0.5
+ shieldrechargerate = 5
+ shieldrechargewaittime = 0.5
primaryThrust = 100
auxilaryThrust = 30
@@ -36,6 +36,8 @@
mass = 100
linearDamping = 0.7
angularDamping = 0.9999999
+
+ explosionSound = "sounds/Explosion2.ogg"
>
<engines>
<MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine2 />
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipCollateralDamage.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipCollateralDamage.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipCollateralDamage.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -15,8 +15,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipDodgeRace.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipDodgeRace.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipDodgeRace.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 20
maxshieldhealth = 20
shieldabsorption = 0.1
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 150
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipEscort.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipEscort.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipEscort.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 35
maxshieldhealth = 60
shieldabsorption = 0.9
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 150
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipGhost.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipGhost.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipGhost.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 100
maxshieldhealth = 150
shieldabsorption = 0.9
- reloadrate = 3
- reloadwaittime = 0.0
+ shieldrechargerate = 3
+ shieldrechargewaittime = 0.0
primaryThrust = 600
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipHeartAttack.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipHeartAttack.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipHeartAttack.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 50
maxshieldhealth = 800
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 40
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipInvader.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipInvader.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipInvader.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 35
maxshieldhealth = 60
shieldabsorption = 0.9
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 150
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipPirate.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipPirate.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipPirate.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 25
maxshieldhealth = 40
shieldabsorption = 0.6
- reloadrate = 2
- reloadwaittime = 0.5
+ shieldrechargerate = 2
+ shieldrechargewaittime = 0.5
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipRace.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipRace.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipRace.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipRing.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipRing.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipRing.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 35
maxshieldhealth = 60
shieldabsorption = 0.9
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 150
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipSpacecruiser.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipSpacecruiser.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipSpacecruiser.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 75
maxshieldhealth = 90
shieldabsorption = 0.9
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 90
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipSwallow.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipSwallow.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipSwallow.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 60
maxshieldhealth = 80
shieldabsorption = 0.75
- reloadrate = 1.5
- reloadwaittime = 0.2
+ shieldrechargerate = 1.5
+ shieldrechargewaittime = 0.2
primaryThrust = 600;
auxilaryThrust = 30;
Modified: code/branches/presentationHS15/data/levels/templates/spaceshipTurret.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/spaceshipTurret.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/spaceshipTurret.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -14,8 +14,8 @@
initialshieldhealth = 30
maxshieldhealth = 50
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/levels/templates/towerdefensetower.oxt
===================================================================
--- code/branches/presentationHS15/data/levels/templates/towerdefensetower.oxt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/templates/towerdefensetower.oxt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -3,8 +3,8 @@
explosionchunks = 6
- reloadrate=10
- reloadwaittime=5
+ shieldrechargerate=10
+ shieldrechargewaittime=5
collisionType="none"
pitch="0"
yaw="0"
Modified: code/branches/presentationHS15/data/levels/towerDefense.oxw
===================================================================
--- code/branches/presentationHS15/data/levels/towerDefense.oxw 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/levels/towerDefense.oxw 2015-12-09 13:45:58 UTC (rev 10961)
@@ -38,8 +38,8 @@
<Template name=tower1template>
<TowerDefenseTower
explosionchunks=6
- reloadrate=10
- reloadwaittime=5
+ shieldrechargerate=10
+ shieldrechargewaittime=5
collisionType="none"
pitch="0"
yaw="0"
@@ -59,7 +59,7 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -68,15 +68,18 @@
<HsW01 mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=1 material="Flares/point_lensflare" delay=0/>
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LaserMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10 replenishamount=1 replenishinterval=0.3/>
+ </munition>
</TowerDefenseTower>
</Template>
<Template name=tower2template>
<TowerDefenseTower
explosionchunks=6
- reloadrate=10
- reloadwaittime=5
+ shieldrechargerate=10
+ shieldrechargewaittime=5
collisionType="none"
pitch="0"
yaw="0"
@@ -96,7 +99,7 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -105,7 +108,10 @@
<LightningGun mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <LightningMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+ </munition>
<attached>
<Backlight position="0,0,0" scale=2.0 colour="0.4, 0.0, 1.0" width=10 length=10 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
</attached>
@@ -115,8 +121,8 @@
<Template name=tower3template>
<TowerDefenseTower
explosionchunks=6
- reloadrate=10
- reloadwaittime=5
+ shieldrechargerate=10
+ shieldrechargewaittime=5
collisionType="none"
pitch="0"
yaw="0"
@@ -136,7 +142,7 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -145,15 +151,18 @@
<SplitGun mode=0 munitionpershot=0 damage=9.3 muzzleoffset=" 1.6, 1.3, -2.0" splittime=0.2 numberofsplits=2 numberofchilds=5 spread=0.1 damagereduction=3.0 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <SplitMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+ </munition>
</TowerDefenseTower>
</Template>
<Template name=tower4template>
<TowerDefenseTower
explosionchunks=6
- reloadrate=10
- reloadwaittime=5
+ shieldrechargerate=10
+ shieldrechargewaittime=5
collisionType="none"
pitch="0"
yaw="0"
@@ -173,16 +182,19 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
</links>
<Weapon>
- <RocketFire mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 />
+ <RocketFire mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 fuel=10/>
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <RocketMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+ </munition>
<attached>
<ParticleSpawner position="0,0,0" source="Orxonox/sparks" lifetime=3.0 autostart=1 loop=1 />
</attached>
@@ -192,8 +204,8 @@
<Template name=tower5template>
<TowerDefenseTower
explosionchunks=6
- reloadrate=10
- reloadwaittime=5
+ shieldrechargerate=10
+ shieldrechargewaittime=5
collisionType="none"
pitch="0"
yaw="0"
@@ -213,7 +225,7 @@
<weaponsets>
<WeaponSet firemode=0 />
</weaponsets>
- <weapons>
+ <weaponpacks>
<WeaponPack>
<links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
@@ -222,7 +234,10 @@
<IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset=" 0,0,0" freezefactor=0.5 freezetime=2.0 />
</Weapon>
</WeaponPack>
- </weapons>
+ </weaponpacks>
+ <munition>
+ <IceMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+ </munition>
</TowerDefenseTower>
</Template>
@@ -242,8 +257,8 @@
initialshieldhealth = 15
maxshieldhealth = 15
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 1000
auxilaryThrust = 30
@@ -307,8 +322,8 @@
initialshieldhealth = 0
maxshieldhealth = 0
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
@@ -380,8 +395,8 @@
initialshieldhealth = 5
maxshieldhealth = 5
shieldabsorption = 0.8
- reloadrate = 1
- reloadwaittime = 1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
primaryThrust = 100
auxilaryThrust = 30
Modified: code/branches/presentationHS15/data/overlays/HUDTemplates3.oxo
===================================================================
--- code/branches/presentationHS15/data/overlays/HUDTemplates3.oxo 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/overlays/HUDTemplates3.oxo 2015-12-09 13:45:58 UTC (rev 10961)
@@ -26,6 +26,24 @@
</OverlayGroup>
</Template>
+<Template name="rockethud">
+ <OverlayGroup name = "rockethud" scale = "1, 1">
+ <HUDRocketFuelBar
+ name = "RocketFuelBar1"
+ background = "Orxonox/BarBackground"
+ size = "0.40, 0.04"
+ position = "0.0 , 1.0 "
+ pickpoint = "0, 1"
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconFuel"
+ >
+ <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+ <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+ <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+ </HUDRocketFuelBar>
+ </OverlayGroup>
+</Template>
+
<Template name="spaceshiphud">
<OverlayGroup name = "spaceshiphud" scale = "1, 1">
<Map />
@@ -33,31 +51,46 @@
<HUDHealthBar
name = "HealthBar1"
background = "Orxonox/HealthBarBackground"
- size = "0.35, 0.0875"
- position = "0.0 , 0.9 "
+ size = "0.40, 0.08"
+ position = "0.0 , 0.85 "
pickpoint = "0, 1"
bartexture = "healthbar_bar.png"
textfont = "VeraMono"
textusebarcolour = true
- textsize = 0.039
- textoffset = "0.315, 0.05"
+ textscale = 0.4
+ textoffset = "0.325, -0.825"
textpickpoint = "0, 0"
textalign = "right"
- correctaspect = false
- textcorrectaspect = false
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconHealth"
>
<BarColour position = 0.0 colour = "0.7,0.2,0.2" />
<BarColour position = 0.5 colour = "0.7,0.7,0.2" />
<BarColour position = 1.0 colour = "0.2,0.7,0.2" />
</HUDHealthBar>
+ <HUDShieldBar
+ name = "ShieldBar1"
+ background = "Orxonox/BarBackground"
+ size = "0.40, 0.04"
+ position = "0.0 , 0.9 "
+ pickpoint = "0, 1"
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconShield"
+ >
+ <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+ <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+ <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+ </HUDShieldBar>
+
<HUDSpeedBar
name = "SpeedBar1"
background = "Orxonox/BarBackground"
- size = "0.35, 0.05"
+ size = "0.40, 0.04"
position = "0.0 , 0.95 "
pickpoint = "0, 1"
- correctaspect = false
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconSpeed"
>
<BarColour position = 0.0 colour = "0.7,0.5,0.2" />
<BarColour position = 0.5 colour = "0.2,0.7,0.2" />
@@ -66,11 +99,12 @@
<HUDBoostBar
name = "BoostBar1"
- backgroundtex = "bar1.png"
- size = "0.35, 0.05"
+ background = "Orxonox/BarBackground"
+ size = "0.40, 0.04"
position = "0.0 , 1.0 "
pickpoint = "0, 1"
- correctaspect = false
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconBoost"
>
<BarColour position = 0.0 colour = "0.7,0.2,0.2" />
<BarColour position = 0.5 colour = "0.7,0.7,0.2" />
@@ -80,24 +114,38 @@
<HUDEnemyHealthBar
name = "EnemyHealthBar"
background = "Orxonox/HealthBarBackground"
- size = "0.35, 0.0875"
- position = "1 ,0.1"
- pickpoint = "1, 1"
+ size = "0.4, 0.08"
+ position = "1 ,0"
+ pickpoint = "1, 0"
bartexture = "healthbar_bar.png"
textfont = "VeraMono"
textusebarcolour = true
- textsize = 0.039
- textoffset = "0.315, 0.05"
+ textscale = 0.4
+ textoffset = "-0.675, 0.175"
textpickpoint = "0, 0"
textalign = "right"
- correctaspect = false
- textcorrectaspect = false
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconHealth"
>
<BarColour position = 0.0 colour = "0.7,0.2,0.2" />
<BarColour position = 0.5 colour = "0.7,0.7,0.2" />
<BarColour position = 1.0 colour = "0.2,0.7,0.2" />
</HUDEnemyHealthBar>
+ <HUDEnemyShieldBar
+ name = "EnemyShieldBar1"
+ background = "Orxonox/BarBackground"
+ size = "0.40, 0.04"
+ position = "1.0 , 0.1 "
+ pickpoint = "1, 0"
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconShield"
+ >
+ <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+ <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+ <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+ </HUDEnemyShieldBar>
+
<HUDNavigation
name = "Navigation"
correctaspect = true
@@ -126,6 +174,15 @@
maximumDotSize3D = 0.06
mapAngle3D = 0.6435011
/>
+
+ <HUDWeaponSystem
+ name = "WeaponSystem"
+ correctaspect = true
+ position = "0.01, 0.01"
+ pickpoint = "0, 0"
+ visible = "true"
+ weaponModeHUDSize = "0.09, 0.03"
+ />
<HUDTimer
name = "Timer"
Modified: code/branches/presentationHS15/data/overlays/HoverHUD.oxo
===================================================================
--- code/branches/presentationHS15/data/overlays/HoverHUD.oxo 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/overlays/HoverHUD.oxo 2015-12-09 13:45:58 UTC (rev 10961)
@@ -31,12 +31,12 @@
bartexture = "healthbar_bar.png"
textfont = "VeraMono"
textusebarcolour = true
- textsize = 0.039
- textoffset = "0.315, 0.05"
+ textscale = 0.4
+ textoffset = "0.325, -0.825"
textpickpoint = "0, 0"
textalign = "right"
- correctaspect = false
- textcorrectaspect = false
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconHealth"
>
<BarColour position = 0.0 colour = "0.7,0.2,0.2" />
<BarColour position = 0.5 colour = "0.7,0.7,0.2" />
Modified: code/branches/presentationHS15/data/overlays/InvaderHUD.oxo
===================================================================
--- code/branches/presentationHS15/data/overlays/InvaderHUD.oxo 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/overlays/InvaderHUD.oxo 2015-12-09 13:45:58 UTC (rev 10961)
@@ -98,12 +98,12 @@
bartexture = "healthbar_bar.png"
textfont = "VeraMono"
textusebarcolour = true
- textsize = 0.039
- textoffset = "0.315, 0.05"
+ textscale = 0.4
+ textoffset = "0.325, -0.825"
textpickpoint = "0, 0"
textalign = "right"
- correctaspect = false
- textcorrectaspect = false
+ correctaspect = true
+ iconmaterial = "Orxonox/BarIconHealth"
>
<BarColour position = 0.0 colour = "0.7,0.2,0.2" />
<BarColour position = 0.5 colour = "0.7,0.7,0.2" />
Modified: code/branches/presentationHS15/data/overlays/jumpHUD.oxo
===================================================================
--- code/branches/presentationHS15/data/overlays/jumpHUD.oxo 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/data/overlays/jumpHUD.oxo 2015-12-09 13:45:58 UTC (rev 10961)
@@ -36,23 +36,7 @@
showScore = false
showFuel = false
showMessages = true
- />
+ />
- <HUDBar
- name = "SpeedBar1"
- background = "Orxonox/BarBackground"
- size = "0.35, 0.05"
- position = "0.0 , 1.0 "
- pickpoint = "0, 1"
- correctaspect = false
-
- initialvalue = 50
-
- >
- <BarColour position = 0.0 colour = "0.7,0.5,0.2" />
- <BarColour position = 0.5 colour = "0.2,0.7,0.2" />
- <BarColour position = 1.0 colour = "0.7,0.2,0.2" />
- </HUDBar>
-
</OverlayGroup>
</Template>
Modified: code/branches/presentationHS15/src/modules/overlays/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/CMakeLists.txt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -15,5 +15,6 @@
OverlaysPrecompiledHeaders.h
LINK_LIBRARIES
orxonox
+ weapons
SOURCE_FILES ${OVERLAYS_SRC_FILES}
)
Modified: code/branches/presentationHS15/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/OverlaysPrereqs.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/OverlaysPrereqs.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -89,7 +89,14 @@
class HUDNavigation;
class HUDRadar;
class HUDSpeedBar;
+ class HUDShieldBar;
class HUDBoostBar;
+ class HUDRocketFuelBar;
+ class HUDEnemyHealthBar;
+ class HUDEnemyShieldBar;
+ class HUDWeaponSystem;
+ class HUDWeapon;
+ class HUDWeaponMode;
class HUDTimer;
class HUDAimAssistant;
class KillMessage;
Modified: code/branches/presentationHS15/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/hud/CMakeLists.txt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -4,9 +4,15 @@
HUDRadar.cc
HUDSpeedBar.cc
HUDBoostBar.cc
+ HUDShieldBar.cc
HUDHealthBar.cc
+ HUDRocketFuelBar.cc
HUDTimer.cc
HUDEnemyHealthBar.cc
+ HUDEnemyShieldBar.cc
+ HUDWeaponMode.cc
+ HUDWeapon.cc
+ HUDWeaponSystem.cc
ChatOverlay.cc
AnnounceMessage.cc
KillMessage.cc
Modified: code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -46,11 +46,10 @@
{
RegisterClass(BarColour);
- BarColour::BarColour(Context* context)
- : BaseObject(context)
+ BarColour::BarColour(Context* context) : BaseObject(context)
{
RegisterObject(BarColour);
-
+
this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
this->setPosition(0.0);
}
@@ -68,8 +67,7 @@
RegisterClass(HUDBar);
- HUDBar::HUDBar(Context* context)
- : OrxonoxOverlay(context), right2Left_(false), autoColour_(false)
+ HUDBar::HUDBar(Context* context) : OrxonoxOverlay(context), right2Left_(false), autoColour_(false)
{
RegisterObject(HUDBar);
@@ -87,6 +85,10 @@
.createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberString()));
this->bar_->setMaterialName(materialname);
+ this->bar_->setPosition(0.0f,0.0f);
+ this->bar_->setDimensions(1.0f,1.0f);
+
+ this->bUseIcon_ = false;
this->value_ = 1.0f; // initialize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
this->setAutoColour(true);
this->setValue(0.0f); // <--
@@ -94,6 +96,11 @@
this->currentColour_ = ColourValue::White;
this->background_->addChild(bar_);
+
+ this->icon_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDBar_icon_" + getUniqueNumberString()));
+ this->icon_->setPosition(0.06f,0.0f);
+ this->icon_->setDimensions(0.1f,1.0f);
+ this->background_->addChild(this->icon_);
}
HUDBar::~HUDBar()
@@ -114,6 +121,7 @@
XMLPortParam(HUDBar, "righttoleft", setRightToLeft, getRightToLeft, xmlelement, mode);
XMLPortParam(HUDBar, "autocolour", setAutoColour, getAutoColour, xmlelement, mode);
XMLPortParam(HUDBar, "bartexture", setBarTexture, getBarTexture, xmlelement, mode);
+ XMLPortParam(HUDBar, "iconmaterial", setIconMaterial, getIconMaterial, xmlelement, mode);
XMLPortObject(HUDBar, BarColour, "", addColour, getColour, xmlelement, mode);
}
@@ -160,19 +168,39 @@
}
}
+ float height = this->bar_->getHeight();
+ float top = this->bar_->getTop();
+
// set value
if (this->right2Left_)
{
// backward case
- this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), 0.0f);
- this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+ if (this->bUseIcon_)
+ {
+ this->bar_->setPosition(0.16f + 0.78f * (1 - this->value_), top);
+ this->bar_->setDimensions(0.78f * this->value_, height);
+ }
+ else
+ {
+ this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), top);
+ this->bar_->setDimensions(0.88f * this->value_, height);
+ }
}
else
{
// default case
- this->bar_->setPosition(0.06f, 0.0f);
- this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+ if (this->bUseIcon_)
+ {
+ this->bar_->setPosition(0.16f, top);
+ this->bar_->setDimensions(0.78f * this->value_, height);
+ }
+ else
+ {
+ this->bar_->setPosition(0.06f, top);
+ this->bar_->setDimensions(0.88f * this->value_, height);
+ }
}
+
if (this->value_ != 0)
this->bar_->setTiling(this->value_, 1.0);
}
@@ -207,4 +235,16 @@
{
return this->textureUnitState_->getTextureName();
}
+
+ void HUDBar::setIconMaterial(const std::string& iconMaterial)
+ {
+ this->bUseIcon_ = true;
+ this->icon_->setMaterialName(iconMaterial);
+ valueChanged();
+ }
+
+ const std::string& HUDBar::getIconMaterial() const
+ {
+ return this->icon_->getMaterialName();
+ }
}
Modified: code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.h
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDBar.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -36,6 +36,7 @@
#include <map>
#include <vector>
+#include <OgrePanelOverlayElement.h>
#include "util/Math.h"
#include "util/OgreForwardRefs.h"
@@ -50,7 +51,7 @@
BarColour(Context* context);
virtual ~BarColour() { }
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
void setColour(const ColourValue& colour) { this->colour_ = colour; }
const ColourValue& getColour() const { return this->colour_; }
@@ -114,12 +115,19 @@
void setBarTexture(const std::string& texture);
const std::string& getBarTexture() const;
+ void setIconMaterial(const std::string& iconMaterial);
+ const std::string& getIconMaterial() const;
+
inline const ColourValue& getCurrentBarColour() const
{ return this->currentColour_; }
+ inline void setIconPosition(Vector2 position)
+ { this->icon_->setPosition(position.x, position.y); }
+ inline void setIconDimensions(Vector2 dimensions)
+ { this->icon_->setDimensions(dimensions.x, dimensions.y); }
+
protected:
virtual void valueChanged();
-
private:
void addColour(BarColour* colour);
BarColour* getColour(unsigned int index);
@@ -128,9 +136,11 @@
bool autoColour_; //!< whether bar changes colour automatically
float value_; //!< progress of bar
ColourValue currentColour_;
+ bool bUseIcon_;
Ogre::PanelOverlayElement* bar_;
Ogre::TextureUnitState* textureUnitState_;
+ Ogre::PanelOverlayElement* icon_;
std::map<float, ColourValue> colours_;
std::vector<BarColour*> barColours_;
Modified: code/branches/presentationHS15/src/modules/overlays/hud/HUDBoostBar.cc
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDBoostBar.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDBoostBar.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -58,7 +58,7 @@
{
if (this->owner_->isBoostCoolingDown())
{
- this->setBackgroundColour(ColourValue(0.7f, 0.2f, 0.2f));
+ //this->setBackgroundColour(ColourValue(0.7f, 0.2f, 0.2f));
if (this->flashDt_ <= 0.0f)
{
this->flashDt_ = this->flashInterval_;
@@ -71,7 +71,7 @@
{
this->flashDt_ = 0.0f;
this->show();
- this->setBackgroundColour(ColourValue(0.2f, 0.7f, 0.2f));
+ //this->setBackgroundColour(ColourValue(0.2f, 0.7f, 0.2f));
}
float value = this->owner_->getBoostPower() / this->owner_->getInitialBoostPower();
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,89 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "HUDEnemyShieldBar.h"
+
+#include "core/config/ConfigValueIncludes.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+ RegisterClass(HUDEnemyShieldBar);
+
+ HUDEnemyShieldBar::HUDEnemyShieldBar(Context* context) : HUDShieldBar(context)
+ {
+ RegisterObject(HUDEnemyShieldBar);
+
+ this->setConfigValues();
+ this->owner_ = NULL;
+ }
+
+ HUDEnemyShieldBar::~HUDEnemyShieldBar()
+ {
+ }
+
+ void HUDEnemyShieldBar::setConfigValues()
+ {
+ SetConfigValue(useEnemyBar_, true);
+ }
+
+ void HUDEnemyShieldBar::tick(float dt)
+ {
+ this->updateTarget();
+
+ SUPER(HUDEnemyShieldBar, tick, dt);
+ }
+
+ void HUDEnemyShieldBar::updateTarget()
+ {
+ Pawn* pawn = NULL;
+ if (this->owner_ && this->useEnemyBar_)
+ {
+ // Get the owner's current target (target is usually a Model)
+ WorldEntity* target = this->owner_->getTarget();
+ // Find the Pawn that belongs to this target (if any)
+ while (target && !target->isA(Class(Pawn)))
+ target = target->getParent();
+ pawn = orxonox_cast<Pawn*>(target);
+ // Don't show the EnemyShieldBar if the pawn is invisible
+ if (pawn && !pawn->isVisible())
+ pawn = NULL;
+ }
+ // Set the pawn as owner of the EnemyShieldBar
+ this->setShieldBarOwner(pawn);
+ this->setVisible(pawn != NULL);
+ }
+
+ void HUDEnemyShieldBar::changedOwner()
+ {
+ SUPER(HUDEnemyShieldBar, changedOwner);
+
+ this->owner_ = orxonox_cast<ControllableEntity*>(this->getOwner());
+ this->updateTarget();
+ }
+}
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,58 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _HUDEnemyShieldBar_H__
+#define _HUDEnemyShieldBar_H__
+
+#include "HUDShieldBar.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ This class displays the shield status of the target enemy of it's owner.
+ */
+ class _OverlaysExport HUDEnemyShieldBar : public HUDShieldBar
+ {
+ public:
+ HUDEnemyShieldBar(Context* context);
+ virtual ~HUDEnemyShieldBar();
+
+ void setConfigValues();
+ virtual void tick(float dt);
+
+ void changedOwner();
+
+ private:
+ void updateTarget();
+
+ ControllableEntity* owner_;
+ bool useEnemyBar_;
+ };
+}
+#endif /* _HUDEnemyShieldBar_H__ */
Modified: code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.cc
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -44,12 +44,20 @@
this->owner_ = 0;
this->bUseBarColour_ = false;
+ this->textOffset_ = Vector2(0.0f, 0.0f);
+ this->textScale_ = 1.0f;
+ this->setIconPosition(Vector2(0.05f,0.5f));
+ this->setIconDimensions(Vector2(0.1f,0.5f));
+
this->textoverlay_ = new OverlayText(this->getContext());
assert(this->textoverlay_.get());
this->textoverlay_->setCaption("");
+ this->textoverlay_->setAspectCorrection(false);
+
+ positionText();
}
HUDHealthBar::~HUDHealthBar()
@@ -57,7 +65,7 @@
if (this->isInitialized())
{
this->textoverlay_->destroy();
- this->textoverlay_ = 0;
+ this->textoverlay_ = NULL;
}
}
@@ -69,12 +77,11 @@
XMLPortParam(HUDHealthBar, "textfont", setTextFont, getTextFont, xmlelement, mode).defaultValues("Monofur");
XMLPortParam(HUDHealthBar, "textusebarcolour", setTextUseBarColour, getTextUseBarColour, xmlelement, mode).defaultValues(false);
XMLPortParam(HUDHealthBar, "textcolour", setTextColour, getTextColour, xmlelement, mode).defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0));
- XMLPortParam(HUDHealthBar, "textsize", setTextSize, getTextSize, xmlelement, mode).defaultValues(1.0f);
XMLPortParam(HUDHealthBar, "textalign", setTextAlignmentString, getTextAlignmentString, xmlelement, mode).defaultValues("left");
XMLPortParam(HUDHealthBar, "textoffset", setTextOffset, getTextOffset, xmlelement, mode).defaultValues(Vector2::ZERO);
+ XMLPortParam(HUDHealthBar, "textscale", setTextScale, getTextScale, xmlelement, mode).defaultValues(1.0f);
XMLPortParam(HUDHealthBar, "textpickpoint", setTextPickPoint, getTextPickPoint, xmlelement, mode).defaultValues(Vector2::ZERO);
XMLPortParam(HUDHealthBar, "textrotation", setTextRotation, getTextRotation, xmlelement, mode).defaultValues(0.0f);
- XMLPortParam(HUDHealthBar, "textcorrectaspect", setTextAspectCorrection, getTextAspectCorrection, xmlelement, mode).defaultValues(true);
XMLPortParam(HUDHealthBar, "textspacewidth", setTextSpaceWidth, getTextSpaceWidth, xmlelement, mode).defaultValues(true);
}
@@ -138,4 +145,22 @@
if (!bUseBarColour)
this->textoverlay_->setColour(this->textColour_);
}
+
+ void HUDHealthBar::positionText()
+ {
+ this->textoverlay_->setPosition(this->getPosition() + this->textOffset_*this->getActualSize());
+ this->textoverlay_->setTextSize(this->getActualSize().y*this->textScale_);
+ }
+
+ void HUDHealthBar::positionChanged()
+ {
+ HUDBar::positionChanged();
+ positionText();
+ }
+
+ void HUDHealthBar::sizeChanged()
+ {
+ HUDBar::sizeChanged();
+ positionText();
+ }
}
Modified: code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.h
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDHealthBar.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -74,31 +74,30 @@
std::string getTextAlignmentString() const
{ return this->textoverlay_->getAlignmentString(); }
- inline void setTextSize(float size)
- { this->textoverlay_->setTextSize(size); }
- inline float getTextSize() const
- { return this->textoverlay_->getTextSize(); }
-
inline void setTextVisible(bool bVisible)
{ this->textoverlay_->setVisible(bVisible); }
inline bool getTextVisible() const
{ return this->textoverlay_->isVisible(); }
+ inline void setTextScale(float scale)
+ { this->textScale_ = scale;
+ positionText();
+ }
+ inline float getTextScale() const
+ { return this->textScale_; }
+
inline void setTextPickPoint(const Vector2& pickpoint)
{ this->textoverlay_->setPickPoint(pickpoint); }
inline Vector2 getTextPickPoint() const
{ return this->textoverlay_->getPickPoint(); }
inline void setTextOffset(const Vector2& position)
- { this->textoverlay_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+ { this->textOffset_ = position;
+ this->positionText();
+ }
inline Vector2 getTextOffset() const
- { return (this->textoverlay_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
+ { return this->textOffset_; }
- inline void setTextAspectCorrection(bool correct)
- { this->textoverlay_->setAspectCorrection(correct); }
- inline bool getTextAspectCorrection() const
- { return this->textoverlay_->getAspectCorrection(); }
-
inline void setTextRotation(const Degree& angle)
{ this->textoverlay_->setRotation(angle); }
inline const Degree& getTextRotation() const
@@ -111,12 +110,17 @@
inline void setHealthBarOwner(Pawn* owner)
{ this->owner_ = owner; }
-
+ protected:
+ virtual void positionChanged();
+ virtual void sizeChanged();
private:
+ virtual void positionText();
WeakPtr<Pawn> owner_;
StrongPtr<OverlayText> textoverlay_;
bool bUseBarColour_;
ColourValue textColour_;
+ Vector2 textOffset_;
+ float textScale_;
};
}
#endif /* _HUDHealthBar_H__ */
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,73 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2src/libraries/core/class/Identifier.h
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "HUDRocketFuelBar.h"
+
+#include "core/CoreIncludes.h"
+#include "weapons/projectiles/Rocket.h"
+
+namespace orxonox
+{
+ RegisterClass(HUDRocketFuelBar);
+
+ HUDRocketFuelBar::HUDRocketFuelBar(Context* context) : HUDBar(context)
+ {
+ RegisterObject(HUDRocketFuelBar);
+
+ this->owner_ = NULL;
+ }
+
+ HUDRocketFuelBar::~HUDRocketFuelBar()
+ {
+ }
+
+ void HUDRocketFuelBar::tick(float dt)
+ {
+ SUPER(HUDRocketFuelBar, tick, dt);
+
+ if (this->owner_)
+ {
+ float maxFuel = this->owner_->getMaxFuel();
+ if (maxFuel > 0.0)
+ {
+ this->setValue(this->owner_->getFuel()/maxFuel);
+ }
+ else
+ {
+ this->setValue(0.0);
+ }
+ }
+ }
+
+ void HUDRocketFuelBar::changedOwner()
+ {
+ SUPER(HUDRocketFuelBar, changedOwner);
+
+ this->owner_ = orxonox_cast<Rocket*>(this->getOwner());
+ }
+}
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.h (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDRocketFuelBar.h)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.h (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,58 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+ /**
+ @file HUDRocketFuelBar.h
+ @brief Definition of the HUDRocketFuelBar class. This HUDBar displays the the amount of fuel that a rocket has.
+*/
+
+#ifndef _HUDRocketFuelBar_H__
+#define _HUDRocketFuelBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "weapons/projectiles/Rocket.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+ class _OverlaysExport HUDRocketFuelBar : public HUDBar, public Tickable
+ {
+ public:
+ HUDRocketFuelBar(Context* context);
+ virtual ~HUDRocketFuelBar();
+
+ virtual void tick(float dt);
+ virtual void changedOwner();
+
+ private:
+ Rocket* owner_;
+ };
+}
+#endif /* _HUDRocketFuelBar_H__ */
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.cc (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDShieldBar.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,81 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "HUDShieldBar.h"
+
+#include "core/CoreIncludes.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+ RegisterClass(HUDShieldBar);
+
+ HUDShieldBar::HUDShieldBar(Context* context)
+ : HUDBar(context)
+ {
+ RegisterObject(HUDShieldBar);
+
+ this->owner_ = NULL;
+ }
+
+ HUDShieldBar::~HUDShieldBar()
+ {
+ }
+
+ void HUDShieldBar::tick(float dt)
+ {
+ SUPER(HUDShieldBar, tick, dt);
+
+ if (this->owner_)
+ {
+ float maxShieldHealth = this->owner_->getMaxShieldHealth();
+ float shieldHealth = this->owner_->getShieldHealth();
+
+ if (maxShieldHealth > 0.0f)
+ {
+ this->setValue(shieldHealth/maxShieldHealth);
+ }
+ else
+ {
+ this->setValue(0.0f);
+ }
+ }
+ else
+ {
+ this->setValue(0.0f);
+ }
+ }
+
+ void HUDShieldBar::changedOwner()
+ {
+ SUPER(HUDShieldBar, changedOwner);
+
+ this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+ }
+}
+
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.h (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDShieldBar.h)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.h (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,60 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _HUDShieldBar_H__
+#define _HUDShieldBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ The HUDShieldBar displays the the status of the shield of its owner (a @ref Pawn).
+ The length of the bar is given by the ratio of the shield health and the maximal shield health of the @ref Pawn.
+ */
+
+ class _OverlaysExport HUDShieldBar : public HUDBar, public Tickable
+ {
+ public:
+ HUDShieldBar(Context* context);
+ virtual ~HUDShieldBar();
+
+ virtual void tick(float dt);
+ virtual void changedOwner();
+
+ inline void setShieldBarOwner(Pawn* owner)
+ { this->owner_ = owner; }
+ private:
+ Pawn* owner_;
+ };
+}
+#endif /* _HUDShieldBar_H__ */
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDWeapon.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,222 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "HUDWeapon.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+ RegisterClass(HUDWeapon);
+
+ HUDWeapon::HUDWeapon(Context* context) : OrxonoxOverlay(context)
+ {
+ RegisterObject(HUDWeapon);
+
+ weaponModeHUDActualSize_ = Vector2(0.0f,0.0f);
+
+ weaponModes_ = NULL;
+ weaponIndex_ = 0;
+ hudWeaponModes_.clear();
+
+ overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeapon" + getUniqueNumberString()));
+ overlayElement_->setMaterialName("Orxonox/WSHUD_Weapon");
+ overlayElement_->setPosition(0.0f,0.0f);
+ overlayElement_->setDimensions(1.0f,1.0f);
+ this->background_->addChild(overlayElement_);
+ }
+
+ HUDWeapon::~HUDWeapon()
+ {
+ if (this->isInitialized())
+ {
+ destroyHUDChilds();
+ }
+ }
+
+ void HUDWeapon::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HUDWeapon, XMLPort, xmlelement, mode);
+
+ /*XMLPortParam(HUDWeapons, "sensitivity", setRadarSensitivity, getRadarSensitivity, xmlelement, mode);
+ XMLPortParam(HUDWeapons, "halfDotSizeDistance", setHalfDotSizeDistance, getHalfDotSizeDistance, xmlelement, mode);*/
+ }
+
+ void HUDWeapon::tick(float dt)
+ {
+ SUPER(HUDWeapon, tick, dt);
+
+ if (!weapon_)
+ {
+ // TODO: destroy this HUD id the Weapon does no more exist. (Wehen the weak pointer is NULL)
+ }
+ }
+
+ void HUDWeapon::positionChanged()
+ {
+ OrxonoxOverlay::positionChanged();
+
+ positionHUDChilds();
+ }
+
+ void HUDWeapon::sizeChanged()
+ {
+ OrxonoxOverlay::sizeChanged();
+
+ positionHUDChilds();
+ }
+
+ void HUDWeapon::changedOwner()
+ {
+ SUPER(HUDWeapon, changedOwner);
+
+ this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+
+ updateWeaponModeList();
+ }
+
+ void HUDWeapon::changedOverlayGroup()
+ {
+ SUPER(HUDWeapon, changedOverlayGroup);
+ }
+
+ void HUDWeapon::changedVisibility()
+ {
+ SUPER(HUDWeapon, changedVisibility);
+
+ bool visible = this->isVisible();
+
+ for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
+ {
+ (*it)->setVisible(visible);
+ }
+ }
+
+ void HUDWeapon::changedName()
+ {
+ SUPER(HUDWeapon, changedName);
+ }
+
+ void HUDWeapon::setWeapon(Weapon* weapon)
+ {
+ weapon_ = weapon;
+
+ if (!weapon_)
+ {
+ return;
+ }
+
+ updateWeaponModeList();
+ }
+
+ void HUDWeapon::updateWeaponModeList()
+ {
+ if (owner_ == NULL || weapon_ == NULL)
+ {
+ return;
+ }
+
+ destroyHUDChilds();
+
+ weaponModes_ = weapon_->getAllWeaponmodes();
+
+ updateSize();
+ createHUDChilds();
+ positionHUDChilds();
+ }
+
+ void HUDWeapon::createHUDChilds()
+ {
+ if (weaponModes_ == NULL)
+ {
+ return;
+ }
+
+ int positionIndex = 0;
+
+ for (std::multimap<unsigned int, WeaponMode*>::iterator it = weaponModes_->begin(); it != weaponModes_->end(); ++it)
+ {
+ HUDWeaponMode* hudWeaponMode = new HUDWeaponMode(this->getContext());
+ hudWeaponMode->setOwner(owner_);
+ hudWeaponMode->setOverlayGroup(this->getOverlayGroup());
+ hudWeaponMode->setWeaponMode(it->second);
+ hudWeaponMode->setWeaponIndex(this->weaponIndex_);
+ hudWeaponMode->setAspectCorrection(false);
+ hudWeaponMode->setPickPoint(Vector2(0.0f,0.0f));
+
+ hudWeaponModes_.push_back(hudWeaponMode);
+
+ ++ positionIndex;
+ }
+ }
+
+ void HUDWeapon::positionHUDChilds()
+ {
+ int positionIndex = 0;
+
+ for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
+ {
+ (*it)->setPositionOffset(this->positionOffset_);
+ (*it)->setWeaponModeIndex(positionIndex);
+ (*it)->setWeaponIndex(this->weaponIndex_);
+ (*it)->setWeaponModeHUDActualSize(this->weaponModeHUDActualSize_);
+
+ ++ positionIndex;
+ }
+ }
+
+ void HUDWeapon::destroyHUDChilds()
+ {
+ for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
+ {
+ (*it)->destroy();
+ }
+
+ hudWeaponModes_.clear();
+ }
+
+ void HUDWeapon::updateSize()
+ {
+ if (weaponModes_ != NULL)
+ {
+ this->setSize(Vector2(weaponModeHUDActualSize_.x,weaponModeHUDActualSize_.y*weaponModes_->size()));
+ updatePosition();
+ }
+ }
+
+ void HUDWeapon::updatePosition()
+ {
+ if (weaponModes_ != NULL)
+ {
+ this->setPosition(Vector2(weaponModeHUDActualSize_.x*weaponIndex_,0.0f) + this->positionOffset_);
+ }
+ }
+}
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.h (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDWeapon.h)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.h (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,107 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _HUDWeapon_H__
+#define _HUDWeapon_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "overlays/OrxonoxOverlay.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponMode.h"
+#include "HUDWeaponMode.h"
+
+namespace orxonox
+{
+ class _OverlaysExport HUDWeapon : public OrxonoxOverlay, public Tickable
+ {
+ public:
+ HUDWeapon(Context* context);
+ virtual ~HUDWeapon();
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ virtual void tick(float dt);
+ virtual void changedOwner();
+ virtual void changedOverlayGroup();
+ virtual void changedVisibility();
+ virtual void changedName();
+ virtual void positionChanged();
+ virtual void sizeChanged();
+
+ virtual void setWeapon(Weapon* weapon);
+
+ inline void setWeaponModeHUDActualSize(Vector2 vector)
+ { weaponModeHUDActualSize_ = vector;
+ this->updateSize();
+ }
+ inline Vector2 getWeaponModeHUDActualSize() const
+ { return weaponModeHUDActualSize_; }
+ inline void setPositionOffset(Vector2 positionOffset)
+ {
+ this->positionOffset_ = positionOffset;
+ this->updatePosition();
+ }
+ inline void setWeaponIndex(int index)
+ {
+ weaponIndex_ = index;
+ this->updatePosition();
+ }
+
+ private:
+ virtual void createHUDChilds();
+ virtual void positionHUDChilds();
+ virtual void destroyHUDChilds();
+ virtual void updateWeaponModeList();
+ virtual void updateSize();
+ virtual void updatePosition();
+
+ WeakPtr<Pawn> owner_;
+ WeakPtr<Weapon> weapon_;
+
+ std::multimap<unsigned int, WeaponMode*>* weaponModes_;
+ std::vector<WeakPtr<HUDWeaponMode> > hudWeaponModes_;
+
+ Ogre::PanelOverlayElement* overlayElement_;
+
+ Vector2 weaponModeHUDActualSize_;
+ Vector2 positionOffset_;
+ int weaponIndex_;
+ };
+}
+
+#endif /* _HUDWeapon_H__ */
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponMode.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,297 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "HUDWeaponMode.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+ RegisterClass(HUDWeaponMode);
+
+ HUDWeaponMode::HUDWeaponMode(Context* context) : OrxonoxOverlay(context)
+ {
+ RegisterObject(HUDWeaponMode);
+
+ weaponIndex_ = 0;
+ weaponModeIndex_ = 0;
+
+ overlayElementIcon_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+ overlayElementIcon_->setPosition(0.0f,0.0f);
+ overlayElementIcon_->setDimensions(1.0f,1.0f);
+ this->background_->addChild(overlayElementIcon_);
+
+ overlayElementReplenish_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+ overlayElementReplenish_->setPosition(0.0f,0.0f);
+ overlayElementReplenish_->setDimensions(1.0f,1.0f);
+ this->background_->addChild(overlayElementReplenish_);
+
+ overlayElementMunition_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+ overlayElementMunition_->setPosition(0.0f,0.0f);
+ overlayElementMunition_->setDimensions(1.0f,1.0f);
+ this->background_->addChild(overlayElementMunition_);
+
+ overlayElementState_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+ overlayElementState_->setPosition(0.0f,0.0f);
+ overlayElementState_->setDimensions(1.0f,1.0f);
+ this->background_->addChild(overlayElementState_);
+
+ overlayElementIcon_->show();
+ overlayElementReplenish_->show();
+ overlayElementMunition_->show();
+ overlayElementState_->show();
+
+ // Create two text overlays
+ this->textOverlayLeft_ = new OverlayText(this->getContext());
+ assert(this->textOverlayLeft_.get());
+ this->textOverlayLeft_->setCaption("?");
+ textOverlayLeft_->setPickPoint(Vector2(0.0f,0.0f));
+ textOverlayLeft_->setVisible(true);
+ textOverlayLeft_->setAlignment(OverlayText::Center);
+ textOverlayLeft_->setTextSize(0.02f);
+ textOverlayLeft_->setColour(ColourValue(0.21,0.70,0.21,1.0));
+ textOverlayLeft_->setAspectCorrection(false);
+ textOverlayLeft_->setZOrder(600);
+
+ this->textOverlayRight_ = new OverlayText(this->getContext());
+ assert(this->textOverlayRight_.get());
+ this->textOverlayRight_->setCaption("?");
+ textOverlayRight_->setPickPoint(Vector2(0.0f,0.0f));
+ textOverlayRight_->setVisible(true);
+ textOverlayRight_->setAlignment(OverlayText::Center);
+ textOverlayRight_->setTextSize(0.02f);
+ textOverlayRight_->setColour(ColourValue(0.21,0.70,0.21,1.0));
+ textOverlayRight_->setAspectCorrection(false);
+ textOverlayRight_->setZOrder(600);
+
+ materialNameState_ = "";
+
+ overlayElementReplenish_->setMaterialName("Orxonox/WSHUD_Replenish");
+ }
+
+ HUDWeaponMode::~HUDWeaponMode()
+ {
+ if (this->isInitialized())
+ {
+ this->textOverlayLeft_->destroy();
+ this->textOverlayRight_->destroy();
+ }
+ }
+
+ void HUDWeaponMode::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HUDWeaponMode, XMLPort, xmlelement, mode);
+ }
+
+ void HUDWeaponMode::tick(float dt)
+ {
+ SUPER(HUDWeaponMode, tick, dt);
+
+ if (this->owner_ && this->weaponMode_)
+ {
+ std::string lastMaterialNameState = materialNameState_;
+
+ if (weaponMode_->getReloading())
+ {
+ materialNameState_ = "Orxonox/WSHUD_Reloading";
+ }
+ else
+ {
+ materialNameState_ = "Orxonox/WSHUD_Ready";
+ }
+
+ Munition* munition = this->weaponMode_->getMunition();
+
+ if (munition != NULL)
+ {
+ MunitionDeployment::Value deployment = munition->getMunitionDeployment();
+
+ if (deployment == MunitionDeployment::Share)
+ {
+ this->textOverlayLeft_->setCaption(multi_cast<std::string>(munition->getNumMunitionInCurrentMagazine(weaponMode_)));
+ this->textOverlayRight_->setCaption(multi_cast<std::string>(munition->getNumMagazines()));
+ }
+ else if (deployment == MunitionDeployment::Stack)
+ {
+ this->textOverlayLeft_->setCaption(multi_cast<std::string>(munition->getNumMunition(weaponMode_)));
+ this->textOverlayRight_->setCaption("");
+ }
+ else if (deployment == MunitionDeployment::Separate)
+ {
+ this->textOverlayLeft_->setCaption(multi_cast<std::string>(munition->getNumMunitionInCurrentMagazine(weaponMode_)));
+ this->textOverlayRight_->setCaption(multi_cast<std::string>(munition->getNumMagazines()));
+ }
+
+ if (munition->getNumMunition(weaponMode_) == 0)
+ {
+ materialNameState_ = "Orxonox/WSHUD_Empty";
+ }
+
+ if (munition->isA(Class(ReplenishingMunition)))
+ {
+ ReplenishingMunition* replenishingMunition = dynamic_cast<ReplenishingMunition*>(munition);
+
+ if (replenishingMunition->canAddMagazines(1))
+ {
+ float progress = 1.0f - replenishingMunition->getProgress();
+ overlayElementReplenish_->setDimensions(1.0f,progress);
+ }
+ else
+ {
+ overlayElementReplenish_->setDimensions(1.0f,1.0f);
+ }
+ }
+ }
+
+ if (materialNameState_ != lastMaterialNameState)
+ {
+ overlayElementState_->setMaterialName(materialNameState_);
+ }
+ }
+ }
+
+ void HUDWeaponMode::positionChanged()
+ {
+ OrxonoxOverlay::positionChanged();
+
+ positionHUDChilds();
+ }
+
+ void HUDWeaponMode::sizeChanged()
+ {
+ OrxonoxOverlay::sizeChanged();
+
+ positionHUDChilds();
+ }
+
+ void HUDWeaponMode::changedOwner()
+ {
+ SUPER(HUDWeaponMode, changedOwner);
+
+ this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+
+ materialNameState_ = ""; // Needed to set the material in the tick after a change of the owner.
+ }
+
+ void HUDWeaponMode::changedOverlayGroup()
+ {
+ SUPER(HUDWeaponMode, changedOverlayGroup);
+
+ this->getOverlayGroup()->addElement(this->textOverlayLeft_.get());
+ this->getOverlayGroup()->addElement(this->textOverlayRight_.get());
+ }
+
+ void HUDWeaponMode::changedVisibility()
+ {
+ SUPER(HUDWeaponMode, changedVisibility);
+
+ bool visible = this->isVisible();
+
+ this->textOverlayLeft_->setVisible(visible);
+ this->textOverlayRight_->setVisible(visible);
+
+ if (visible)
+ {
+ overlayElementIcon_->show();
+ overlayElementReplenish_->show();
+ overlayElementMunition_->show();
+ overlayElementState_->show();
+ }
+ }
+
+ void HUDWeaponMode::changedName()
+ {
+ SUPER(HUDWeaponMode, changedName);
+
+ //this->textOverlay_->setName(this->getName() + "text");
+ }
+
+ void HUDWeaponMode::setWeaponMode(WeaponMode* weaponMode)
+ {
+ weaponMode_ = weaponMode;
+
+ if (!weaponMode_)
+ {
+ return;
+ }
+
+ std::string materialName = weaponMode_->getHUDImageString();
+
+ overlayElementIcon_->setMaterialName(materialName);
+
+ Munition* munition = this->weaponMode_->getMunition();
+
+ if (munition != NULL)
+ {
+ MunitionDeployment::Value deployment = munition->getMunitionDeployment();
+
+ if (deployment == MunitionDeployment::Share)
+ {
+ overlayElementMunition_->setMaterialName("Orxonox/WSHUD_MunitionShare");
+ }
+ else if (deployment == MunitionDeployment::Stack)
+ {
+ overlayElementMunition_->setMaterialName("Orxonox/WSHUD_MunitionStack");
+ }
+ else if (deployment == MunitionDeployment::Separate)
+ {
+ overlayElementMunition_->setMaterialName("Orxonox/WSHUD_MunitionSeparate");
+ }
+ }
+ }
+
+ void HUDWeaponMode::positionHUDChilds()
+ {
+ Vector2 size = Vector2(getSize().x*45.0f/150.0f, getSize().y);
+ Vector2 offset1 = Vector2(getSize().x*82.5f/150.0f, 0.0f);
+ Vector2 offset2 = Vector2(getSize().x*127.5f/150.0f, 0.0f);
+
+ textOverlayLeft_->setPosition(getPosition() + offset1);
+ textOverlayRight_->setPosition(getPosition() + offset2);
+
+ textOverlayLeft_->setSize(size);
+ textOverlayRight_->setSize(size);
+
+ textOverlayLeft_->setTextSize(getSize().y);
+ textOverlayRight_->setTextSize(getSize().y);
+ }
+
+ void HUDWeaponMode::updateSize()
+ {
+ this->setSize(weaponModeHUDActualSize_);
+ updatePosition();
+ }
+
+ void HUDWeaponMode::updatePosition()
+ {
+ this->setPosition(Vector2(weaponModeHUDActualSize_.x*weaponIndex_,weaponModeHUDActualSize_.y*weaponModeIndex_) + this->positionOffset_);
+ }
+}
\ No newline at end of file
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.h (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponMode.h)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.h (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,115 @@
+
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _HUDWeaponMode_H__
+#define _HUDWeaponMode_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "overlays/OrxonoxOverlay.h"
+#include "overlays/OverlayText.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "weaponsystem/ReplenishingMunition.h"
+#include "weaponsystem/WeaponMode.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+ class _OverlaysExport HUDWeaponMode : public OrxonoxOverlay, public Tickable
+ {
+ public:
+ HUDWeaponMode(Context* context);
+ virtual ~HUDWeaponMode();
+
+ virtual void tick(float dt);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ virtual void changedOwner();
+ virtual void changedOverlayGroup();
+ virtual void changedVisibility();
+ virtual void changedName();
+ virtual void positionChanged();
+ virtual void sizeChanged();
+
+ virtual void setWeaponMode(WeaponMode* weaponMode);
+
+ inline void setWeaponModeHUDActualSize(Vector2 vector)
+ { weaponModeHUDActualSize_ = vector;
+ this->updateSize();
+ }
+ inline Vector2 getWeaponModeHUDActualSize() const
+ { return weaponModeHUDActualSize_; }
+ inline void setWeaponIndex(int index)
+ { weaponIndex_ = index;
+ this->updatePosition();
+ }
+ inline void setWeaponModeIndex(int index)
+ { weaponModeIndex_ = index;
+ this->updatePosition();
+ }
+ inline void setPositionOffset(Vector2 positionOffset)
+ {
+ this->positionOffset_ = positionOffset;
+ this->updatePosition();
+ }
+
+ private:
+ virtual void updateSize();
+ virtual void updatePosition();
+ virtual void positionHUDChilds();
+
+ WeakPtr<Pawn> owner_;
+ WeakPtr<WeaponMode> weaponMode_;
+
+ Ogre::PanelOverlayElement* overlayElementIcon_;
+ Ogre::PanelOverlayElement* overlayElementReplenish_;
+ Ogre::PanelOverlayElement* overlayElementMunition_;
+ Ogre::PanelOverlayElement* overlayElementState_;
+
+ std::string materialNameState_;
+
+ StrongPtr<OverlayText> textOverlayLeft_;
+ StrongPtr<OverlayText> textOverlayRight_;
+
+ Vector2 weaponModeHUDActualSize_;
+ Vector2 positionOffset_;
+ int weaponIndex_;
+ int weaponModeIndex_;
+ };
+}
+
+#endif /* _HUDWeaponMode_H__ */
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponSystem.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,186 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "HUDWeaponSystem.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/Weapon.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+ RegisterClass(HUDWeaponSystem);
+
+ HUDWeaponSystem::HUDWeaponSystem(Context* context) : OrxonoxOverlay(context)
+ {
+ RegisterObject(HUDWeaponSystem);
+
+ weaponModeHUDSize_ = Vector2(0.0f,0.0f);
+ weaponModeHUDActualSize_ = Vector2(0.0f,0.0f);
+
+ weapons_.clear();
+ hudWeapons_.clear();
+ }
+
+ HUDWeaponSystem::~HUDWeaponSystem()
+ {
+ if (this->isInitialized())
+ {
+ destroyHUDChilds();
+ }
+ }
+
+ void HUDWeaponSystem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HUDWeaponSystem, XMLPort, xmlelement, mode);
+
+ XMLPortParam(HUDWeaponSystem, "weaponModeHUDSize", setWeaponModeHUDSize, getWeaponModeHUDSize, xmlelement, mode);
+ }
+
+ void HUDWeaponSystem::positionChanged()
+ {
+ OrxonoxOverlay::positionChanged();
+
+ positionHUDChilds();
+ }
+
+ void HUDWeaponSystem::sizeChanged()
+ {
+ OrxonoxOverlay::sizeChanged();
+
+ weaponModeHUDActualSize_ = this->getActualSize();
+
+ positionHUDChilds();
+ }
+
+ void HUDWeaponSystem::changedOwner()
+ {
+ SUPER(HUDWeaponSystem, changedOwner);
+
+ this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+
+ updateWeaponList();
+ }
+
+ void HUDWeaponSystem::changedOverlayGroup()
+ {
+ SUPER(HUDWeaponSystem, changedOverlayGroup);
+ }
+
+ void HUDWeaponSystem::changedVisibility()
+ {
+ SUPER(HUDWeaponSystem, changedVisibility);
+
+ bool visible = this->isVisible();
+
+ for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
+ {
+ (*it)->setVisible(visible);
+ }
+ }
+
+ void HUDWeaponSystem::changedName()
+ {
+ SUPER(HUDWeaponSystem, changedName);
+ }
+
+ void HUDWeaponSystem::updateWeaponList()
+ {
+ if (owner_ == NULL)
+ {
+ return;
+ }
+
+ weapons_.clear();
+
+ destroyHUDChilds();
+
+ std::vector<WeaponPack*>* weaponPacks = owner_->getAllWeaponPacks();
+
+ for (std::vector<WeaponPack*>::const_iterator itPacks = weaponPacks->begin(); itPacks != weaponPacks->end(); ++itPacks)
+ {
+ std::vector<Weapon*>* weapons = (*itPacks)->getAllWeapons();
+
+ for (std::vector<Weapon*>::const_iterator itWeapons = weapons->begin(); itWeapons != weapons->end(); ++itWeapons)
+ {
+ this->weapons_.push_back(*itWeapons);
+ }
+ }
+
+ createHUDChilds();
+ positionHUDChilds();
+ }
+
+ void HUDWeaponSystem::createHUDChilds()
+ {
+ int positionIndex = 0;
+
+ for (std::vector<WeakPtr<Weapon> >::iterator it = weapons_.begin(); it != weapons_.end(); ++it)
+ {
+ HUDWeapon* hudWeapon = new HUDWeapon(this->getContext());
+ hudWeapon->setOwner(owner_);
+ hudWeapon->setOverlayGroup(this->getOverlayGroup());
+ hudWeapon->setWeapon(*it);
+ hudWeapon->setAspectCorrection(false);
+ hudWeapon->setPickPoint(Vector2(0.0f,0.0f));
+
+ hudWeapons_.push_back(hudWeapon);
+
+ ++ positionIndex;
+ }
+ }
+
+ void HUDWeaponSystem::positionHUDChilds()
+ {
+ int positionIndex = 0;
+ Vector2 offset = this->getPosition();
+
+ for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
+ {
+ (*it)->setPositionOffset(offset);
+ (*it)->setWeaponIndex(positionIndex);
+ (*it)->setWeaponModeHUDActualSize(this->weaponModeHUDActualSize_);
+
+ ++ positionIndex;
+ }
+ }
+
+ void HUDWeaponSystem::destroyHUDChilds()
+ {
+ for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
+ {
+ (*it)->destroy();
+ }
+
+ hudWeapons_.clear();
+ }
+}
Copied: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.h (from rev 10960, code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponSystem.h)
===================================================================
--- code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.h (rev 0)
+++ code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,81 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _HUDWeaponSystem_H__
+#define _HUDWeaponSystem_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include "overlays/OrxonoxOverlay.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "HUDWeapon.h"
+
+namespace orxonox
+{
+ class _OverlaysExport HUDWeaponSystem : public OrxonoxOverlay
+ {
+ public:
+ HUDWeaponSystem(Context* context);
+ virtual ~HUDWeaponSystem();
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ virtual void changedOwner();
+ virtual void changedOverlayGroup();
+ virtual void changedVisibility();
+ virtual void changedName();
+ virtual void positionChanged();
+ virtual void sizeChanged();
+ protected:
+ inline void setWeaponModeHUDSize(Vector2 vector)
+ { weaponModeHUDSize_ = vector;
+ this->setSize(weaponModeHUDSize_);
+ }
+ inline Vector2 getWeaponModeHUDSize() const
+ { return weaponModeHUDSize_; }
+ private:
+ virtual void updateWeaponList();
+ virtual void createHUDChilds();
+ virtual void positionHUDChilds();
+ virtual void destroyHUDChilds();
+
+ WeakPtr<Pawn> owner_;
+
+ std::vector<WeakPtr<Weapon> > weapons_;
+ std::vector<WeakPtr<HUDWeapon> > hudWeapons_;
+
+ Vector2 weaponModeHUDSize_;
+ Vector2 weaponModeHUDActualSize_;
+ };
+}
+
+#endif /* _HUDWeaponSystem_H__ */
Modified: code/branches/presentationHS15/src/modules/pickup/PickupPrereqs.h
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/PickupPrereqs.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/pickup/PickupPrereqs.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -84,6 +84,8 @@
class ShieldPickup;
class ShrinkPickup;
class DamageBoostPickup;
+ class MunitionPickup;
+ class MunitionContainer;
}
#endif /* _PickupPrereqs_H__ */
Modified: code/branches/presentationHS15/src/modules/pickup/PickupRepresentation.cc
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/PickupRepresentation.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/pickup/PickupRepresentation.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -186,7 +186,7 @@
sphere->setScale(0.1f);
Billboard* icon = new Billboard(spawner->getContext());
icon->setColour(ColourValue(0.89f, 0.79f, 0.08f));
- icon->setMaterial("asterisk");
+ icon->setMaterial("Unknown");
icon->setScale(0.5);
sphere->attach(icon);
representation->attach(sphere);
Copied: code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.cc (from rev 10960, code/branches/fabienHS15/src/modules/pickup/items/BoostPickup.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,147 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file BoostPickup.cc
+ @brief Implementation of the BoostPickup class.
+*/
+
+#include "BoostPickup.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+
+namespace orxonox
+{
+ RegisterClass(BoostPickup);
+
+ /**
+ @brief
+ Constructor. Registers the object and initializes the member variables.
+ */
+ BoostPickup::BoostPickup(Context* context) : Pickup(context)
+ {
+ RegisterObject(BoostPickup);
+
+ this->initialize();
+ }
+
+ /**
+ @brief
+ Destructor.
+ */
+ BoostPickup::~BoostPickup()
+ {
+ }
+
+ /**
+ @brief
+ Initializes the member variables.
+ */
+ void BoostPickup::initialize(void)
+ {
+ this->boostRefill_ = 0.0f;
+ //Defines who is allowed to pick up the pickup.
+ this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier());
+ }
+
+ /**
+ @brief
+ Method for creating a BoostPickup object through XML.
+ */
+ void BoostPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+ {
+ SUPER(BoostPickup, XMLPort, xmlelement, mode);
+
+ XMLPortParam(BoostPickup, "boostrefill", setBoostRefill, getBoostRefill, xmlelement, mode);
+ }
+
+ /**
+ @brief
+ Set the boost refill of this pickup.
+ */
+ void BoostPickup::setBoostRefill(float boostRefill)
+ {
+ if(boostRefill >= 0.0f && boostRefill <= 1.0f)
+ {
+ this->boostRefill_ = boostRefill;
+ }
+ }
+
+ /**
+ @brief
+ Is called when the pickup has transisted from used to unused or the other way around.
+ */
+ void BoostPickup::changedUsed(void)
+ {
+ SUPER(BoostPickup, changedUsed);
+
+ SpaceShip* ship = this->carrierToSpaceShipHelper();
+ if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
+ this->Pickupable::destroy();
+
+ // If the pickup has transited to used.
+ if(this->isUsed())
+ {
+ float gainedBoostPower = ship->getInitialBoostPower() * boostRefill_;
+ ship->gainBoostPower(gainedBoostPower);
+
+ // This will destroy the pickp
+ this->setUsed(false);
+ }
+ else
+ {
+ this->Pickupable::destroy();
+ }
+ }
+
+ /**
+ @brief
+ Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
+ @return
+ A pointer to the SpaceShip, or NULL if the conversion failed.
+ */
+ SpaceShip* BoostPickup::carrierToSpaceShipHelper(void)
+ {
+ PickupCarrier* carrier = this->getCarrier();
+ SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
+
+ if(ship == NULL)
+ {
+ orxout(internal_error, context::pickups) << "Invalid PickupCarrier in BoostPickup." << endl;
+ }
+
+ return ship;
+ }
+
+
+}
+
Copied: code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.h (from rev 10960, code/branches/fabienHS15/src/modules/pickup/items/BoostPickup.h)
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.h (rev 0)
+++ code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,72 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file BoostPickup.h
+ @brief Declaration of the BoostPickup class.
+ @ingroup PickupItems
+*/
+
+#ifndef _BoostPickup_H__
+#define _BoostPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+
+#include "pickup/Pickup.h"
+
+namespace orxonox
+{
+
+ class _PickupExport BoostPickup : public Pickup
+ {
+ public:
+
+ BoostPickup(Context* context); //!< Constructor.
+ virtual ~BoostPickup(); //!< Destructor.
+
+ virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a BoostPickup object through XML.
+
+ virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+ inline float getBoostRefill()
+ { return this->boostRefill_; }
+
+ protected:
+ void setBoostRefill(float boostRefill); //!< Sets the boost refill according to the XML.
+
+ private:
+ void initialize(void); //!< Initializes the member variables.
+ Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+ SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
+
+ float boostRefill_; //!< The amount of boost refilled by the user of the pickup. 1.0 means full refill, 0.5 means half refill.
+ };
+}
+
+#endif /* _BoostPickup_H__ */
Modified: code/branches/presentationHS15/src/modules/pickup/items/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/pickup/items/CMakeLists.txt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -7,4 +7,7 @@
ShieldPickup.cc
ShrinkPickup.cc
DamageBoostPickup.cc
+ BoostPickup.cc
+ MunitionPickup.cc
+ MunitionContainer.cc
)
Modified: code/branches/presentationHS15/src/modules/pickup/items/DronePickup.h
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/DronePickup.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/pickup/items/DronePickup.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -42,7 +42,8 @@
#include "pickup/Pickup.h"
#include "tools/interfaces/Tickable.h"
-namespace orxonox {
+namespace orxonox
+{
/**
@brief
@@ -79,9 +80,6 @@
void initialize(void); //!< Initializes the member variables.
std::string droneTemplate_; //!< The name of the template, based upon which the Drone is created.
Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
-
-
-
};
}
Copied: code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.cc (from rev 10960, code/branches/fabienHS15/src/modules/pickup/items/MunitionContainer.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,117 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file MunitionContainer.cc
+ @brief Implementation of the MunitionContainer class. This class is only used by the MunitionPickup class to defines how much munition of what type the pickup contains.
+*/
+
+#include "MunitionContainer.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+ RegisterClass(MunitionContainer);
+
+ /**
+ @brief
+ Constructor. Registers the object and initializes the member variables.
+ */
+ MunitionContainer::MunitionContainer(Context* context) : BaseObject(context)
+ {
+ RegisterObject(MunitionContainer);
+
+ this->munitionName_ = "";
+ this->munitionAmount_ = 1;
+ this->magazinesAmount_ = 1;
+ }
+
+ /**
+ @brief
+ Destructor.
+ */
+ MunitionContainer::~MunitionContainer()
+ {
+ }
+
+ /**
+ @brief
+ Method for creating a MunitionContainer object through XML.
+ */
+ void MunitionContainer::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+ {
+ SUPER(MunitionContainer, XMLPort, xmlelement, mode);
+
+ XMLPortParam(MunitionContainer, "munitiontype", setMunitionName, getMunitionName, xmlelement, mode).defaultValues("LaserMunition");
+ XMLPortParam(MunitionContainer, "munitionamount", setMunitionAmount, getMunitionAmount, xmlelement, mode).defaultValues(1);
+ XMLPortParam(MunitionContainer, "magazinesamount", setMagazinesAmount, getMagazinesAmount, xmlelement, mode).defaultValues(0);
+ }
+
+ void MunitionContainer::setMunitionName(const std::string& munitionName)
+ {
+ Identifier* identifier = ClassByString(munitionName);
+ if (identifier)
+ {
+ this->munitionName_ = munitionName;
+ this->munitionType_ = identifier;
+ }
+ else
+ {
+ this->munitionName_ = "";
+ orxout(internal_warning) << "Invalid munition class defined in MunitionContainer." << endl;
+ }
+ }
+
+ void MunitionContainer::setMunitionAmount(int munitionAmount)
+ {
+ if (munitionAmount > 0)
+ {
+ munitionAmount_ = munitionAmount;
+ }
+ else
+ {
+ munitionAmount_ = 0;
+ }
+ }
+
+ void MunitionContainer::setMagazinesAmount(int magazinesAmount)
+ {
+ if (magazinesAmount > 0)
+ {
+ magazinesAmount_ = magazinesAmount;
+ }
+ else
+ {
+ magazinesAmount_ = 0;
+ }
+ }
+}
+
Copied: code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.h (from rev 10960, code/branches/fabienHS15/src/modules/pickup/items/MunitionContainer.h)
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.h (rev 0)
+++ code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,80 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file MunitionContainer.h
+ @brief Declaration of the MunitionContainer class.
+ @ingroup PickupItems
+*/
+
+#ifndef _MunitionContainer_H__
+#define _MunitionContainer_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+
+#include "pickup/Pickup.h"
+#include "core/class/SubclassIdentifier.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+ class _PickupExport MunitionContainer : public BaseObject
+ {
+ public:
+
+ MunitionContainer(Context* context);
+ virtual ~MunitionContainer();
+
+ virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode);
+
+ inline const std::string& getMunitionName() const
+ { return this->munitionName_; }
+ inline int getMunitionAmount() const
+ { return this->munitionAmount_; }
+ inline int getMagazinesAmount() const
+ { return this->magazinesAmount_; }
+ inline SubclassIdentifier<Munition> getMunitionType() const
+ { return munitionType_; }
+
+ protected:
+ void setMunitionName(const std::string& munitionName);
+ void setMunitionAmount(int munitionAmount);
+ void setMagazinesAmount(int magazinesAmount_);
+
+ private:
+ SubclassIdentifier<Munition> munitionType_; //!< Indentifier of the munition type.
+ std::string munitionName_; //!< String containing the class name of the munition type (e.g. "LaserMunition")
+ int munitionAmount_; //!< The amount of singe bullets added
+ int magazinesAmount_; //!< The amount of full magazines added
+
+ };
+}
+
+#endif // _MunitionContainer_H__
Copied: code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.cc (from rev 10960, code/branches/fabienHS15/src/modules/pickup/items/MunitionPickup.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,156 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file MunitionPickup.cc
+ @brief Implementation of the MunitionPickup class.
+*/
+
+#include "MunitionPickup.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+ RegisterClass(MunitionPickup);
+
+ /**
+ @brief
+ Constructor. Registers the object and initializes the member variables.
+ */
+ MunitionPickup::MunitionPickup(Context* context) : Pickup(context)
+ {
+ RegisterObject(MunitionPickup);
+
+ this->initialize();
+ }
+
+ /**
+ @brief
+ Destructor.
+ */
+ MunitionPickup::~MunitionPickup()
+ {
+ }
+
+ /**
+ @brief
+ Initializes the member variables.
+ */
+ void MunitionPickup::initialize(void)
+ {
+ //Defines who is allowed to pick up the pickup.
+ this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
+ }
+
+ /**
+ @brief
+ Method for creating a MunitionPickup object through XML.
+ */
+ void MunitionPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+ {
+ SUPER(MunitionPickup, XMLPort, xmlelement, mode);
+
+ XMLPortObject(MunitionPickup, MunitionContainer, "munitioncontainers", addMunitionContainer, getMunitionContainer, xmlelement, mode);
+ }
+
+ void MunitionPickup::addMunitionContainer(MunitionContainer* munitionContainer)
+ {
+ OrxAssert(munitionContainer != NULL, "The munitionContainer cannot be NULL.");
+ this->munitionContainers_.push_back(munitionContainer);
+ }
+
+ MunitionContainer* MunitionPickup::getMunitionContainer(unsigned int index)
+ {
+ if(this->munitionContainers_.size() >= index)
+ return NULL;
+ else
+ return this->munitionContainers_[index];
+ }
+
+ /**
+ @brief
+ Is called when the pickup has transisted from used to unused or the other way around.
+ */
+ void MunitionPickup::changedUsed(void)
+ {
+ SUPER(MunitionPickup, changedUsed);
+
+ Pawn* pawn = this->carrierToPawnHelper();
+
+ if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ this->Pickupable::destroy();
+
+ // If the pickup has transited to used.
+ if(this->isUsed())
+ {
+ for(std::vector<MunitionContainer*>::iterator it = this->munitionContainers_.begin(); it != this->munitionContainers_.end(); ++it)
+ {
+ //Get pointer to the appropriate munition
+ SubclassIdentifier<Munition> identifier = (*it)->getMunitionType();
+ Munition* munition = pawn->getMunition(&identifier);
+ if (munition)
+ {
+ // Add munition and magzines
+ munition->addMunition((*it)->getMunitionAmount());
+ munition->addMagazines((*it)->getMagazinesAmount());
+ }
+ (*it)->destroy();
+ }
+ // This will destroy the pickp
+ this->setUsed(false);
+ }
+ else
+ {
+ this->Pickupable::destroy();
+ }
+ }
+
+ /**
+ @brief
+ Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+ @return
+ A pointer to the Pawn, or NULL if the conversion failed.
+ */
+ Pawn* MunitionPickup::carrierToPawnHelper(void)
+ {
+ PickupCarrier* carrier = this->getCarrier();
+ Pawn* pawn = orxonox_cast<Pawn*>(carrier);
+
+ if(pawn == NULL)
+ {
+ orxout(internal_error, context::pickups) << "Invalid PickupCarrier in MunitionPickup." << endl;
+ }
+ return pawn;
+ }
+}
+
Copied: code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.h (from rev 10960, code/branches/fabienHS15/src/modules/pickup/items/MunitionPickup.h)
===================================================================
--- code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.h (rev 0)
+++ code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,77 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file MunitionPickup.h
+ @brief Declaration of the MunitionPickup class.
+ @ingroup PickupItems
+*/
+
+#ifndef _MunitionPickup_H__
+#define _MunitionPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+#include <vector>
+
+#include "pickup/Pickup.h"
+#include "pickup/items/MunitionContainer.h"
+#include "core/class/SubclassIdentifier.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ The MunitionPickup gives munition to the user (a @ref Pawn).
+ */
+ class _PickupExport MunitionPickup : public Pickup
+ {
+ public:
+
+ MunitionPickup(Context* context); //!< Constructor.
+ virtual ~MunitionPickup(); //!< Destructor.
+
+ virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a MunitionPickup object through XML.
+
+ virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+
+ virtual void addMunitionContainer(MunitionContainer* munitionContainer);
+ MunitionContainer* getMunitionContainer(unsigned int index);
+
+ private:
+ void initialize(void); //!< Initializes the member variables.
+ Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+
+ std::vector<MunitionContainer*> munitionContainers_;
+
+ };
+}
+
+#endif // _MunitionPickup_H__
Modified: code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseTower.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseTower.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -60,14 +60,8 @@
if(upgrade < 5)
{
upgrade++;
- float reloadrate = getReloadRate();
- float reloadwaittime = getReloadWaitTime();
this->setDamageMultiplier((upgrade+1)*2.0f);
//this->setRotationThrust(2*this->getRotationThrust());
- reloadrate = 0.5f*reloadrate;
- reloadwaittime = 0.5f*reloadwaittime;
- setReloadRate(reloadrate);
- setReloadWaitTime(reloadwaittime);
//this->addTemplate("towerturret1");
}
else
Modified: code/branches/presentationHS15/src/modules/weapons/WeaponsPrereqs.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/WeaponsPrereqs.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/WeaponsPrereqs.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -68,19 +68,26 @@
namespace orxonox
{
class MuzzleFlash;
+ class IceGunFreezer;
+ class RocketController;
// munitions
class FusionMunition;
class LaserMunition;
- class ReplenishingMunition;
class RocketMunition;
class GravityBombMuntion;
+ class IceMunition;
+ class LightningMunition;
+ class SplitMunition;
// projectiles
class BillboardProjectile;
class LightningGunProjectile;
class ParticleProjectile;
+ class IceProjectile;
+ class SplitProjectile;
class Projectile;
+ class BasicProjectile;
class Rocket;
class RocketOld;
class SimpleRocket;
@@ -90,6 +97,8 @@
class EnergyDrink;
class FusionFire;
class HsW01;
+ class IceGun;
+ class SplitGun;
class LaserFire;
class LightningGun;
class RocketFire;
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/CMakeLists.txt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,6 +1,6 @@
ADD_SOURCE_FILES(WEAPONS_SRC_FILES
- ReplenishingMunition.cc
LaserMunition.cc
+ LightningMunition.cc
FusionMunition.cc
RocketMunition.cc
GravityBombMunition.cc
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -27,12 +27,13 @@
*/
/**
- @file FusionMunition.h
+ @file FusionMunition.cc
@brief Implementation of the FusionMunition class.
*/
#include "FusionMunition.h"
#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -44,13 +45,20 @@
this->maxMunitionPerMagazine_ = 10;
this->maxMagazines_ = 10;
- this->magazines_ = 10;
+ this->unassignedMagazines_ = 10;
- this->bUseSeparateMagazines_ = true;
- this->bStackMunition_ = false;
+ this->deployment_ = MunitionDeployment::Separate;
+
this->reloadTime_ = 1.0f;
this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+ this->reloadTime_ = 0.5f;
}
+
+ void FusionMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(FusionMunition, XMLPort, xmlelement, mode);
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/FusionMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -52,6 +52,7 @@
public:
FusionMunition(Context* context);
virtual ~FusionMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
};
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -6,6 +6,7 @@
*/
#include "GravityBombMunition.h"
#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -16,15 +17,20 @@
RegisterObject(GravityBombMunition);
this->maxMunitionPerMagazine_ = 1;
this->maxMagazines_ = 30;
- this->magazines_ = 15;
+ this->unassignedMagazines_ = 15;
- this->bUseSeparateMagazines_ = false;
- this->bStackMunition_ = true;
+ this->deployment_ = MunitionDeployment::Stack;
this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+ this->reloadTime_ = 0.0f;
}
+ void GravityBombMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(GravityBombMunition, XMLPort, xmlelement, mode);
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/GravityBombMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -27,6 +27,7 @@
public:
GravityBombMunition(Context* context);
virtual ~GravityBombMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
};
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -27,12 +27,13 @@
*/
/**
- @file IceMunition.h
+ @file IceMunition.cc
@brief Implementation of the IceMunition class.
*/
#include "IceMunition.h"
#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -44,12 +45,18 @@
this->maxMunitionPerMagazine_ = 1;
this->maxMagazines_ = 50;
- this->magazines_ = 25;
+ this->unassignedMagazines_ = 25;
- this->bUseSeparateMagazines_ = false;
- this->bStackMunition_ = true;
+ this->deployment_ = MunitionDeployment::Stack;
- this->bAllowMunitionRefilling_ = false;
+ this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+ this->reloadTime_ = 0.5f;
}
+
+ void IceMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(IceMunition, XMLPort, xmlelement, mode);
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -52,6 +52,7 @@
public:
IceMunition(Context* context);
virtual ~IceMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
};
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -27,12 +27,13 @@
*/
/**
- @file LaserMunition.h
+ @file LaserMunition.cc
@brief Implementation of the LaserMunition class.
*/
#include "LaserMunition.h"
#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -43,16 +44,22 @@
RegisterObject(LaserMunition);
this->maxMunitionPerMagazine_ = 20;
- this->maxMagazines_ = 1;
- this->magazines_ = 1;
+ this->maxMagazines_ = 10;
+ this->unassignedMagazines_ = 10;
- this->bUseSeparateMagazines_ = false;
- this->bStackMunition_ = true;
+ this->deployment_ = MunitionDeployment::Separate;
this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = true;
- this->replenishInterval_ = 0.5f;
- this->replenishMunitionAmount_ = 1;
+ this->replenishInterval_ = 7.0f;
+ this->replenishAmount_ = 1;
+
+ this->reloadTime_ = 0.5f;
}
+
+ void LaserMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(LaserMunition, XMLPort, xmlelement, mode);
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/LaserMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -35,7 +35,7 @@
#define _LaserMunition_H__
#include "weapons/WeaponsPrereqs.h"
-#include "ReplenishingMunition.h"
+#include "weaponsystem/ReplenishingMunition.h"
namespace orxonox
{
@@ -52,6 +52,7 @@
public:
LaserMunition(Context* context);
virtual ~LaserMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
};
}
Copied: code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.cc (from rev 10960, code/branches/fabienHS15/src/modules/weapons/munitions/LightningMunition.cc)
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.cc (rev 0)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,62 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file LightningMunition.cc
+ @brief Implementation of the LightningMunition class.
+*/
+
+#include "LightningMunition.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+ RegisterClass(LightningMunition);
+
+ LightningMunition::LightningMunition(Context* context) : Munition(context)
+ {
+ RegisterObject(LightningMunition);
+
+ this->maxMunitionPerMagazine_ = 20;
+ this->maxMagazines_ = 1;
+ this->unassignedMagazines_ = 1;
+
+ this->deployment_ = MunitionDeployment::Share;
+
+ this->bAllowMunitionRefilling_ = true;
+ this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+ this->reloadTime_ = 0.5f;
+ }
+
+ void LightningMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(LightningMunition, XMLPort, xmlelement, mode);
+ }
+}
Copied: code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.h (from rev 10960, code/branches/fabienHS15/src/modules/weapons/munitions/LightningMunition.h)
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.h (rev 0)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,59 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabien Vultier
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file LightningMunition.h
+ @brief Definition of the LightningMunition class.
+*/
+
+#ifndef _LightningMunition_H__
+#define _LightningMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+
+ /**
+ @brief
+ LightningMunition.
+ @author
+ Fabien Vultier
+ @ingroup WeaponsMunitions
+ */
+ class _WeaponsExport LightningMunition : public Munition
+ {
+ public:
+ LightningMunition(Context* context);
+ virtual ~LightningMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ };
+}
+
+#endif /* _LightningMunition_H__ */
Deleted: code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,75 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file ReplenishingMunition.h
- @brief Implementation of the ReplenishingMunition class.
-*/
-
-#include "ReplenishingMunition.h"
-
-#include "core/CoreIncludes.h"
-#include "core/command/Executor.h"
-
-namespace orxonox
-{
- RegisterClass(ReplenishingMunition);
-
- ReplenishingMunition::ReplenishingMunition(Context* context) : Munition(context)
- {
- RegisterObject(ReplenishingMunition);
-
- this->replenishInterval_ = 1.0f;
- this->replenishMunitionAmount_ = 1;
-
- // Use the timer to initialize itself after the first tick (because the real values for
- // replenishIntervall_ and replenishMunitionAmount_ will be set in the constructor of the
- // inheriting class, which comes after this constructor)
- this->replenishingTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer, this)));
- }
-
- void ReplenishingMunition::initializeTimer()
- {
- // Initialize the timer
- this->replenishingTimer_.setTimer(this->replenishInterval_, true, createExecutor(createFunctor(&ReplenishingMunition::replenish, this)));
- }
-
- void ReplenishingMunition::replenish()
- {
- // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every
- // case except the internal munition replenishing
- bool temp = this->bAllowMunitionRefilling_;
- this->bAllowMunitionRefilling_ = true;
-
- // Replenish munition
- this->addMunition(this->replenishMunitionAmount_);
-
- // Write back the temporary value
- this->bAllowMunitionRefilling_ = temp;
- }
-}
Deleted: code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/ReplenishingMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,70 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file ReplenishingMunition.h
- @brief Definition of the ReplenishingMunition class.
-*/
-
-#ifndef _ReplenishingMunition_H__
-#define _ReplenishingMunition_H__
-
-#include "weapons/WeaponsPrereqs.h"
-
-#include "tools/Timer.h"
-#include "weaponsystem/Munition.h"
-
-namespace orxonox
-{
-
- /**
- @brief
- Munition that is replenished by a certain amount each time interval.
- @author
- Fabian 'x3n' Landau
- @ingroup WeaponsMunitions
- */
- class _WeaponsExport ReplenishingMunition : public Munition
- {
- public:
- ReplenishingMunition(Context* context);
- virtual ~ReplenishingMunition() {}
-
- protected:
- float replenishInterval_; //!< The interval in which the munition is replenished.
- unsigned int replenishMunitionAmount_; //!< The amount by which it is replenished.
-
- private:
- void replenish();
- void initializeTimer();
-
- Timer replenishingTimer_; //!< Timer to do the replenishing.
- };
-}
-
-#endif /* _ReplenishingMunition_H__ */
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -27,12 +27,13 @@
*/
/**
- @file RocketMunition.h
+ @file RocketMunition.cc
@brief Implementation of the RocketMunition class.
*/
#include "RocketMunition.h"
#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -44,12 +45,18 @@
this->maxMunitionPerMagazine_ = 1;
this->maxMagazines_ = 30;
- this->magazines_ = 10;
+ this->unassignedMagazines_ = 10;
- this->bUseSeparateMagazines_ = false;
- this->bStackMunition_ = true;
+ this->deployment_ = MunitionDeployment::Stack;
- this->bAllowMunitionRefilling_ = false;
+ this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+ this->reloadTime_ = 0.5f;
}
+
+ void RocketMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(RocketMunition, XMLPort, xmlelement, mode);
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/RocketMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -52,6 +52,7 @@
public:
RocketMunition(Context* context);
virtual ~RocketMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
};
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -27,12 +27,13 @@
*/
/**
- @file SplitMunition.h
+ @file SplitMunition.cc
@brief Implementation of the SplitMunition class.
*/
#include "SplitMunition.h"
#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -42,14 +43,20 @@
{
RegisterObject(SplitMunition);
- this->maxMunitionPerMagazine_ = 1;
- this->maxMagazines_ = 100;
- this->magazines_ = 25;
+ this->maxMunitionPerMagazine_ = 5;
+ this->maxMagazines_ = 10;
+ this->unassignedMagazines_ = 5;
- this->bUseSeparateMagazines_ = false;
- this->bStackMunition_ = true;
+ this->deployment_ = MunitionDeployment::Share;
this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+ this->reloadTime_ = 0.5f;
}
+
+ void SplitMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(SplitMunition, XMLPort, xmlelement, mode);
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -52,6 +52,7 @@
public:
SplitMunition(Context* context);
virtual ~SplitMunition() {}
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
};
}
Modified: code/branches/presentationHS15/src/modules/weapons/projectiles/BasicProjectile.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/projectiles/BasicProjectile.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/projectiles/BasicProjectile.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -67,7 +67,7 @@
/**
@brief
The function called when a projectile hits another thing.
- Calls the hit-function, starts the reload countdown, displays visual hit effects defined in Pawn.
+ Calls the hit-function, starts the shield recharge countdown, displays visual hit effects defined in Pawn.
Needs to be called in the collidesAgainst() function by every Class directly inheriting from BasicProjectile.
@param otherObject
A pointer to the object the Projectile has collided against.
@@ -96,7 +96,7 @@
if (victim)
{
victim->hit(this->getShooter(), contactPoint, cs, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());
- victim->startReloadCountdown();
+ victim->startShieldRechargeCountdown();
}
// Visual effects for being hit, depending on whether the shield is hit or not
Modified: code/branches/presentationHS15/src/modules/weapons/projectiles/GravityBombField.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/projectiles/GravityBombField.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/projectiles/GravityBombField.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -163,7 +163,6 @@
if (lifetime_ <= -4)
{
- orxout(debug_output) << "Timeout. Destroying field." << endl;
this->destroy();
}
}
Modified: code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -65,7 +65,7 @@
RegisterObject(Rocket);// Register the Rocket class to the core
this->localAngularVelocity_ = 0;
- this->lifetime_ = 100.0f;
+ this->lifetime_ = 20.0f;
if (GameMode::isMaster())
{
@@ -75,7 +75,7 @@
// Create rocket model
Model* model = new Model(this->getContext());
model->setMeshSource("rocket.mesh");
- model->scale(0.7f);
+ model->scale(1.0f);
this->attach(model);
// Add effects.
@@ -99,8 +99,6 @@
collisionShape->setHeight(500);
this->attachCollisionShape(collisionShape);
- this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
-
// Add sound
this->defSndWpnEngine_ = new WorldSound(this->getContext());
this->defSndWpnEngine_->setLooping(true);
@@ -113,6 +111,8 @@
this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg");
this->defSndWpnLaunch_->setVolume(1.0f);
this->attach(defSndWpnLaunch_);
+
+ this->setHudTemplate("rockethud");
}
else
{
@@ -319,4 +319,14 @@
this->localAngularVelocity_.z += value.x;
}
+ float Rocket::getFuel() const
+ {
+ return this->destroyTimer_.getRemainingTime();
+ }
+
+ void Rocket::setMaxFuel(float fuel)
+ {
+ this->lifetime_ = fuel;
+ this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
+ }
}
Modified: code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/projectiles/Rocket.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -117,6 +117,17 @@
virtual void fired(unsigned int firemode);
+ /**
+ @brief Set the maximum lifetime of the rocket.
+ */
+ virtual void setMaxFuel(float fuel);
+ /**
+ @brief Get the maximum lifetime of the rocket.
+ */
+ inline float getMaxFuel() const
+ { return lifetime_; }
+ virtual float getFuel() const;
+
private:
Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input.
Modified: code/branches/presentationHS15/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/projectiles/SimpleRocket.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/projectiles/SimpleRocket.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -75,7 +75,7 @@
// Create rocket model.
Model* model = new Model(this->getContext());
model->setMeshSource("rocket.mesh");
- model->scale(0.7f);
+ model->scale(1.0f);
this->attach(model);
// Add effects.
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/EnergyDrink.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/EnergyDrink.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/EnergyDrink.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -62,6 +62,8 @@
this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&EnergyDrink::shot, this)));
this->delayTimer_.stopTimer();
+
+ hudImageString_ = "Orxonox/WSHUD_WM_EnergyDrink";
}
void EnergyDrink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/FusionFire.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/FusionFire.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/FusionFire.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -57,6 +57,8 @@
this->speed_ = 750.0f;
this->setMunitionName("FusionMunition");
+
+ hudImageString_ = "Orxonox/WSHUD_WM_FusionFire";
}
/**
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/GravityBombFire.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/GravityBombFire.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/GravityBombFire.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -30,6 +30,8 @@
this->setMunitionName("GravityBombMunition");
this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8); ///< sets sound of the bomb as it is fired.
+
+ hudImageString_ = "Orxonox/WSHUD_WM_GravityBombFire";
}
GravityBombFire::~GravityBombFire(){};
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/HsW01.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/HsW01.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -68,6 +68,8 @@
this->delayTimer_.stopTimer();
this->setDefaultSound(this->sound_);
+
+ hudImageString_ = "Orxonox/WSHUD_WM_HsW01";
}
HsW01::~HsW01()
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -58,8 +58,10 @@
this->setFreezeTime(3.0);
this->setFreezeFactor(0.5);
- this->setMunitionName("LaserMunition");
+ this->setMunitionName("IceMunition");
this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+
+ hudImageString_ = "Orxonox/WSHUD_WM_IceGun";
}
IceGun::~IceGun()
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/LaserFire.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/LaserFire.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/LaserFire.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -55,6 +55,8 @@
this->speed_ = 750.0f;
this->setMunitionName("LaserMunition");
+
+ hudImageString_ = "Orxonox/WSHUD_WM_LaserFire";
}
/**
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/LightningGun.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/LightningGun.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/LightningGun.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -53,8 +53,10 @@
this->damage_ = 0.0f;
this->speed_ = 750.0f;
- this->setMunitionName("LaserMunition");
+ this->setMunitionName("LightningMunition");
this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+
+ hudImageString_ = "Orxonox/WSHUD_WM_LightningGun";
}
LightningGun::~LightningGun()
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -40,7 +40,7 @@
#include "weaponsystem/WeaponPack.h"
#include "weaponsystem/WeaponSystem.h"
#include "worldentities/pawns/Pawn.h"
-
+#include "core/XMLPort.h"
#include "weapons/projectiles/Rocket.h"
namespace orxonox
@@ -55,9 +55,12 @@
this->bParallelReload_ = false;
this->damage_ = 0.0f;
this->speed_ = 500.0f;
+ this->fuel_ = 10.0f;
this->setMunitionName("RocketMunition");
// The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+
+ hudImageString_ = "Orxonox/WSHUD_WM_RocketFire";
}
RocketFire::~RocketFire()
@@ -66,6 +69,17 @@
/**
@brief
+ XMLPort for the RocketFire. You can define the maximum lifetime of the rockets
+ */
+ void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(RocketFire, XMLPort, xmlelement, mode);
+
+ XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode);
+ }
+
+ /**
+ @brief
Fires the weapon. Creates the Rocket and fires it.
*/
void RocketFire::fire()
@@ -76,11 +90,12 @@
rocket->setOrientation(this->getMuzzleOrientation());
rocket->setPosition(this->getMuzzlePosition());
rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
- rocket->scale(2);
+ rocket->scale(1.0f);
rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
rocket->setDamage(this->getDamage());
rocket->setShieldDamage(this->getShieldDamage());
rocket->setHealthDamage(this->getHealthDamage());
+ rocket->setMaxFuel(this->fuel_);
}
}
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.h
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFire.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -53,10 +53,17 @@
RocketFire(Context* context);
virtual ~RocketFire();
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
virtual void fire();
+ inline void setFuel(float fuel)
+ { this->fuel_ = fuel; }
+ inline float getFuel() const
+ { return this->fuel_; }
private:
float speed_; //!< The speed of the Rocket.
+ float fuel_; //!< The maximum lifetime of the rocket
};
}
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFireOld.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFireOld.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/RocketFireOld.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -58,6 +58,8 @@
this->setMunitionName("RocketMunition");
// The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+
+ hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire";
}
RocketFireOld::~RocketFireOld()
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/SimpleRocketFire.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/SimpleRocketFire.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -63,6 +63,8 @@
this->setMunitionName("RocketMunition");
this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4f);
// The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+
+ hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire";
}
SimpleRocketFire::~SimpleRocketFire()
@@ -82,12 +84,14 @@
rocket->setPosition(this->getMuzzlePosition());
rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+ rocket->scale(1.0f);
rocket->setDamage(this->damage_);
rocket->setShieldDamage(this->getShieldDamage());
rocket->setHealthDamage(this->getHealthDamage());
WorldEntity* pawn = static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget();
- if (pawn) controller->setTarget(pawn);
+ if (pawn)
+ controller->setTarget(pawn);
}
}
Modified: code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.cc
===================================================================
--- code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -34,7 +34,7 @@
#include "SplitGun.h"
#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
+#include "core/XMLPort.h"
#include "weaponsystem/Weapon.h"
#include "weaponsystem/WeaponPack.h"
#include "weaponsystem/WeaponSystem.h"
@@ -61,6 +61,8 @@
this->setMunitionName("SplitMunition");
this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+
+ hudImageString_ = "Orxonox/WSHUD_WM_SplitGun";
}
SplitGun::~SplitGun()
Modified: code/branches/presentationHS15/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/OrxonoxPrereqs.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/OrxonoxPrereqs.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -166,6 +166,7 @@
// weaponsystem
class DefaultWeaponmodeLink;
class Munition;
+ class ReplenishingMunition;
class Weapon;
class WeaponMode;
class WeaponPack;
Modified: code/branches/presentationHS15/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/controllers/HumanController.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/controllers/HumanController.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -198,7 +198,7 @@
/**
@brief
Starts the boosting mode.
- Resets the boosting timeout and ells the ControllableEntity to boost (or not boost anymore).
+ Resets the boosting timeout and tells the ControllableEntity to boost (or not boost anymore).
*/
void HumanController::startBoosting(void)
{
Modified: code/branches/presentationHS15/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/infos/PlayerInfo.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/infos/PlayerInfo.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -201,6 +201,10 @@
this->controller_->setControllableEntity(entity);
this->changedControllableEntity();
+
+ // HACK-ish
+ if(this->isHumanPlayer())
+ entity->createHud();
}
void PlayerInfo::stopControl()
@@ -252,6 +256,8 @@
if( !entity || this->previousControllableEntity_.size() == 0 )
return;
+ entity->destroyHud(); // HACK-ish
+
this->controllableEntity_->setController(0);
if(this->isHumanPlayer()) // TODO: Multiplayer?
this->controllableEntity_->destroyHud(); // HACK-ish
Modified: code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -449,4 +449,12 @@
Ogre::TextureUnitState* tempTx = ptr->getTechnique(0)->getPass(0)->getTextureUnitState(0);
tempTx->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour);
}
+
+ void OrxonoxOverlay::setZOrder(unsigned short order)
+ {
+ if (this->overlay_)
+ {
+ this->overlay_->setZOrder(order);
+ }
+ }
}
Modified: code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/overlays/OrxonoxOverlay.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -64,7 +64,7 @@
- Standard Ogre::PanelOverlayElement for a background image (class doesn't have to be derived
only for displaying a picture).
- Reacts to changes of the window aspect
- - Last but not least: On demand you can tell the overlay to automatically resale to correct for
+ - Last but not least: On demand you can tell the overlay to automatically rescale to correct for
aspect distortion. E.g. if you play 1024x768 you wouldn't want a round object to be oval.
Remark: This can (due to the Ogre::Overlay transformation order) only work for angle that are
multiples of 90 degrees. But it's only a small drawback.
@@ -185,6 +185,7 @@
{ return this->group_; }
virtual void changedOverlayGroup()
{ this->changedVisibility(); }
+ virtual void setZOrder(unsigned short order);
protected:
virtual void angleChanged();
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/CMakeLists.txt 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/CMakeLists.txt 2015-12-09 13:45:58 UTC (rev 10961)
@@ -1,5 +1,6 @@
ADD_SOURCE_FILES(ORXONOX_SRC_FILES
Munition.cc
+ ReplenishingMunition.cc
Weapon.cc
WeaponMode.cc
WeaponPack.cc
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -23,7 +23,7 @@
* Martin Polak
* Fabian 'x3n' Landau
* Co-authors:
- * ...
+ * Fabien Vultier
*
*/
@@ -31,6 +31,7 @@
#include "core/CoreIncludes.h"
#include "core/command/Executor.h"
+#include "core/XMLPort.h"
namespace orxonox
{
@@ -42,40 +43,50 @@
this->maxMunitionPerMagazine_ = 10;
this->maxMagazines_ = 10;
- this->magazines_ = 10;
+ this->unassignedMagazines_ = 10;
- this->bUseSeparateMagazines_ = false;
- this->bStackMunition_ = true;
+ this->deployment_ = MunitionDeployment::Stack;
this->bAllowMunitionRefilling_ = true;
this->bAllowMultiMunitionRemovementUnderflow_ = true;
- this->reloadTime_ = 0;
+ this->reloadTime_ = 0.5f;
+
+ this->lastFilledWeaponMode_ = NULL;
}
Munition::~Munition()
{
- for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+ for (std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.begin(); it != this->assignedMagazines_.end(); ++it)
delete it->second;
}
+ void Munition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(Munition, XMLPort, xmlelement, mode);
+
+ XMLPortParam(Munition, "initialmagazines", setNumMagazines, getNumMagazines, xmlelement, mode);
+ XMLPortParam(Munition, "maxmagazines", setMaxMagazines, getMaxMagazines, xmlelement, mode);
+ XMLPortParam(Munition, "munitionpermagazine", setMaxMunitionPerMagazine, getMaxMunitionPerMagazine, xmlelement, mode);
+ }
+
Munition::Magazine* Munition::getMagazine(WeaponMode* user) const
{
- if (this->bUseSeparateMagazines_)
+ if (deployment_ == MunitionDeployment::Separate)
{
// For separated magazines we definitively need a given user
if (!user)
return 0;
// Use the map to get the magazine assigned to the given user
- std::map<WeaponMode*, Magazine*>::const_iterator it = this->currentMagazines_.find(user);
- if (it != this->currentMagazines_.end())
+ std::map<WeaponMode*, Magazine*>::const_iterator it = this->assignedMagazines_.find(user);
+ if (it != this->assignedMagazines_.end())
return it->second;
}
else
{
// We don't use separate magazines for each user, so just take the first magazine
- if (this->currentMagazines_.size() > 0)
- return this->currentMagazines_.begin()->second;
+ if (this->assignedMagazines_.size() > 0)
+ return this->assignedMagazines_.begin()->second;
}
return 0;
@@ -86,9 +97,9 @@
Magazine* magazine = this->getMagazine(user);
if (magazine)
{
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
// With stacked munition every magazine contributes to the total amount
- return this->maxMunitionPerMagazine_ * this->magazines_ + magazine->munition_;
+ return this->maxMunitionPerMagazine_ * this->unassignedMagazines_ + magazine->munition_;
else
// Wihtout stacked munition we just consider the current magazine
return magazine->munition_;
@@ -108,20 +119,25 @@
unsigned int Munition::getNumMagazines() const
{
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
{
// If we stack munition and the current magazine is still full, it counts too
Magazine* magazine = this->getMagazine(0);
if (magazine && magazine->munition_ == this->maxMunitionPerMagazine_)
- return this->magazines_ + 1;
+ return this->unassignedMagazines_ + 1;
}
- return this->magazines_;
+ return this->unassignedMagazines_;
}
+ void Munition::setNumMagazines(unsigned int numMagazines)
+ {
+ this->unassignedMagazines_ = numMagazines;
+ }
+
unsigned int Munition::getMaxMunition() const
{
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
return this->maxMunitionPerMagazine_ * this->maxMagazines_;
else
return this->maxMunitionPerMagazine_;
@@ -134,19 +150,28 @@
{
unsigned int munition = magazine->munition_;
- // If we stack munition, we con't care about the current magazine - we just need enough munition in total
- if (this->bStackMunition_)
- munition += this->maxMunitionPerMagazine_ * this->magazines_;
+ // If we stack munition, we don't care about the current magazine - we just need enough munition in total
+ if (deployment_ == MunitionDeployment::Stack)
+ {
+ munition += this->maxMunitionPerMagazine_ * this->unassignedMagazines_;
+ }
if (munition == 0)
+ {
// Absolutely no munition - no chance to take munition
return false;
+ }
else if (this->bAllowMultiMunitionRemovementUnderflow_)
+ {
// We're not empty AND we allow underflow, so this will always work
return true;
+ }
else
+ {
// We don't allow underflow, so we have to check the amount
return (munition >= amount);
+ }
+
}
return false;
}
@@ -168,13 +193,13 @@
else
{
// Not enough munition
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
{
// We stack munition, so just take what we can and then load the next magazine
amount -= magazine->munition_;
magazine->munition_ = 0;
- if (this->reload(0))
+ if (this->reload(NULL))
// Successfully reloaded, continue recursively
return this->takeMunition(amount, 0);
else
@@ -198,7 +223,7 @@
bool Munition::canReload() const
{
// As long as we have enough magazines (and don't stack munition) we can reload
- return (this->magazines_ > 0 && !this->bStackMunition_);
+ return (this->unassignedMagazines_ > 0 && deployment_ != MunitionDeployment::Stack);
}
bool Munition::needReload(WeaponMode* user) const
@@ -206,7 +231,7 @@
Magazine* magazine = this->getMagazine(user);
if (magazine)
{
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
// With stacked munition, we never have to reload
return false;
else
@@ -226,28 +251,34 @@
return false;
// Check if we actually can reload
- if (this->magazines_ == 0)
+ if (this->unassignedMagazines_ == 0)
return false;
// If we use separate magazines for each user, we definitively need a user given
- if (this->bUseSeparateMagazines_ && !user)
+ if (deployment_ == MunitionDeployment::Separate && !user)
return false;
// If we don't use separate magazines, set user to 0
- if (!this->bUseSeparateMagazines_)
- user = 0;
+ if (deployment_ != MunitionDeployment::Separate)
+ {
+ user = NULL;
+ }
// Remove the current magazine for the given user
- std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.find(user);
- if (it != this->currentMagazines_.end())
+ std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.find(user);
+ if (it != this->assignedMagazines_.end())
{
+ if (it->first == lastFilledWeaponMode_)
+ {
+ lastFilledWeaponMode_ = NULL;
+ }
delete it->second;
- this->currentMagazines_.erase(it);
+ this->assignedMagazines_.erase(it);
}
// Load a new magazine
- this->currentMagazines_[user] = new Magazine(this, bUseReloadTime);
- this->magazines_--;
+ this->assignedMagazines_[user] = new Magazine(this, bUseReloadTime);
+ this->unassignedMagazines_--;
return true;
}
@@ -259,7 +290,7 @@
if (!this->bAllowMunitionRefilling_)
return false;
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
{
// If we stack munition, we can always add munition until we reach the limit
return (this->getNumMunition(0) < this->getMaxMunition());
@@ -267,7 +298,7 @@
else
{
// Return true if any of the current magazines is not full (loading counts as full although it returns 0 munition)
- for (std::map<WeaponMode*, Magazine*>::const_iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+ for (std::map<WeaponMode*, Magazine*>::const_iterator it = this->assignedMagazines_.begin(); it != this->assignedMagazines_.end(); ++it)
if (it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
return true;
}
@@ -280,10 +311,10 @@
if (!this->canAddMunition(amount))
return false;
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
{
// Stacking munition means, if a magazine gets full, the munition adds to a new magazine
- Magazine* magazine = this->getMagazine(0);
+ Magazine* magazine = this->getMagazine(NULL);
if (magazine)
{
// Add the whole amount
@@ -293,13 +324,13 @@
while (magazine->munition_ > this->maxMunitionPerMagazine_)
{
magazine->munition_ -= this->maxMunitionPerMagazine_;
- this->magazines_++;
+ this->unassignedMagazines_++;
}
- // If we reached the limit, reduze both magazines and munition to the maximum
- if (this->magazines_ >= this->maxMagazines_)
+ // If we reached the limit, reduce both magazines and munition to the maximum
+ if (this->unassignedMagazines_ >= this->maxMagazines_)
{
- this->magazines_ = this->maxMagazines_ - 1;
+ this->unassignedMagazines_ = this->maxMagazines_;
magazine->munition_ = this->maxMunitionPerMagazine_;
}
@@ -311,24 +342,48 @@
}
else
{
+ std::map<WeaponMode*, Magazine*>::iterator it;
+
+ // If the pointer to the weapon mode whose magazine got munition added to is NULL, then set the iterator to the beginning of the map
+ // Otherwise set it to the next weapon mode
+ if (lastFilledWeaponMode_ == NULL)
+ {
+ it = this->assignedMagazines_.begin();
+ }
+ else
+ {
+ it = this->assignedMagazines_.find(lastFilledWeaponMode_);
+ ++ it;
+ }
+
// Share the munition equally to the current magazines
+ bool firstLoop = true;
while (amount > 0)
{
bool change = false;
- for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+ while (it != this->assignedMagazines_.end())
{
// Add munition if the magazine isn't full (but only to loaded magazines)
if (amount > 0 && it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
{
it->second->munition_++;
amount--;
+ lastFilledWeaponMode_ = it->first;
change = true;
}
+
+ ++it;
}
// If there was no change in a loop, all magazines are full (or locked due to loading)
- if (!change)
+ // Because the first loop does not start at the beginning of the map we have to treat is separately
+ if (!change && !firstLoop)
+ {
break;
+ }
+
+ it = this->assignedMagazines_.begin();
+ firstLoop = false;
}
return true;
@@ -339,36 +394,40 @@
{
// TODO: 'amount' is not used
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
// If we stack munition, we can always add new magazines because they contribute directly to the munition
return (this->getNumMunition(0) < this->getMaxMunition());
else
// If we don't stack munition, we're more limited
- return ((this->currentMagazines_.size() + this->magazines_) < this->maxMagazines_);
+ return ((this->assignedMagazines_.size() + this->unassignedMagazines_) < this->maxMagazines_);
}
- bool Munition::addMagazines(unsigned int amount)
+ unsigned int Munition::addMagazines(unsigned int amount)
{
+ unsigned int addedMagazines = 0;
+
if (!this->canAddMagazines(amount))
- return false;
+ return 0;
// Calculate how many magazines are needed
- int needed_magazines = this->maxMagazines_ - this->magazines_ - this->currentMagazines_.size();
+ int needed_magazines = this->maxMagazines_ - this->unassignedMagazines_ - this->assignedMagazines_.size();
// If zero or less magazines are needed, we definitively don't need more magazines (unless we stack munition - then a magazine contributes directly to the munition)
- if (needed_magazines <= 0 && !this->bStackMunition_)
- return false;
+ if (needed_magazines <= 0 && deployment_ != MunitionDeployment::Stack)
+ return 0;
if (amount <= static_cast<unsigned int>(needed_magazines))
{
// We need more magazines than we get, so just add them
- this->magazines_ += amount;
+ this->unassignedMagazines_ += amount;
+ addedMagazines = amount;
}
else
{
// We get more magazines than we need, so just add the needed amount
- this->magazines_ += needed_magazines;
- if (this->bStackMunition_)
+ this->unassignedMagazines_ += needed_magazines;
+ addedMagazines = needed_magazines;
+ if (deployment_ == MunitionDeployment::Stack)
{
// We stack munition, so the additional amount contributes directly to the munition of the current magazine
Magazine* magazine = this->getMagazine(0);
@@ -377,19 +436,33 @@
}
}
- return true;
+ // Reload as many empty magazines as possible
+ // Double loop and break is needed because the reload function changes the assigned magazines. This may confuse the iterator.
+ for (unsigned int i = 0; i < addedMagazines; ++i)
+ {
+ for (std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.begin(); it != this->assignedMagazines_.end(); ++it)
+ {
+ if (needReload(it->first))
+ {
+ reload(it->first);
+ break;
+ }
+ }
+ }
+
+ return addedMagazines;
}
bool Munition::canRemoveMagazines(unsigned int amount) const
{
- if (this->bStackMunition_)
+ if (deployment_ == MunitionDeployment::Stack)
{
- if (this->magazines_ >= amount)
+ if (this->unassignedMagazines_ >= amount)
{
// We have enough magazines
return true;
}
- else if (this->magazines_ == amount - 1)
+ else if (this->unassignedMagazines_ == amount - 1)
{
// We lack one magazine, check if the current magazine is still full, if yes we're fine
Magazine* magazine = this->getMagazine(0);
@@ -405,7 +478,7 @@
else
{
// In case we're not stacking munition, just check the number of magazines
- return (this->magazines_ >= amount);
+ return (this->unassignedMagazines_ >= amount);
}
return false;
@@ -416,15 +489,15 @@
if (!this->canRemoveMagazines(amount))
return false;
- if (this->magazines_ >= amount)
+ if (this->unassignedMagazines_ >= amount)
{
// We have enough magazines, just remove the amount
- this->magazines_ -= amount;
+ this->unassignedMagazines_ -= amount;
}
- else if (this->bStackMunition_)
+ else if (deployment_ == MunitionDeployment::Stack)
{
// We don't have enough magazines, but we're stacking munition, so additionally remove the bullets from the current magazine
- this->magazines_ = 0;
+ this->unassignedMagazines_ = 0;
Magazine* magazine = this->getMagazine(0);
if (magazine)
magazine->munition_ = 0;
@@ -436,19 +509,23 @@
bool Munition::dropMagazine(WeaponMode* user)
{
// If we use separate magazines, we need a user
- if (this->bUseSeparateMagazines_ && !user)
+ if (deployment_ == MunitionDeployment::Separate && !user)
return false;
// If we don't use separate magazines, set user to 0
- if (!this->bUseSeparateMagazines_)
- user = 0;
+ if (deployment_ != MunitionDeployment::Separate)
+ user = NULL;
// Remove the current magazine for the given user
- std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.find(user);
- if (it != this->currentMagazines_.end())
+ std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.find(user);
+ if (it != this->assignedMagazines_.end())
{
+ if (it->first == lastFilledWeaponMode_)
+ {
+ lastFilledWeaponMode_ = NULL;
+ }
delete it->second;
- this->currentMagazines_.erase(it);
+ this->assignedMagazines_.erase(it);
return true;
}
@@ -464,7 +541,7 @@
this->munition_ = 0;
this->bLoaded_ = false;
- if (bUseReloadTime && munition->reloadTime_ > 0 && !munition->bStackMunition_)
+ if (bUseReloadTime && munition->reloadTime_ > 0 && !munition->deployment_ == MunitionDeployment::Stack)
{
const ExecutorPtr& executor = createExecutor(createFunctor(&Magazine::loaded, this));
executor->setDefaultValues(munition);
@@ -480,4 +557,4 @@
this->bLoaded_ = true;
this->munition_ = munition->maxMunitionPerMagazine_;
}
-}
+}
\ No newline at end of file
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/Munition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -23,7 +23,7 @@
* Martin Polak
* Fabian 'x3n' Landau
* Co-authors:
- * ...
+ * Fabien Vultier
*
*/
@@ -38,8 +38,18 @@
namespace orxonox
{
+ namespace MunitionDeployment
+ {
+ enum Value
+ {
+ Separate, // Every comsuming weapon mode has its own magazine. It is possible that one weapon mode is out of ammo while another still has some.
+ Share, // All comsuming weapon modes take their munition from the same magazine. If this magazine is empty a new one is loaded.
+ Stack // There is only one magazine where all the munition is stored. Use this deployment mode for heavy weapons loke rockets, bombs, ...
+ };
+ }
+
class _OrxonoxExport Munition : public BaseObject
- {
+ {
struct Magazine
{
public:
@@ -58,6 +68,8 @@
Munition(Context* context);
virtual ~Munition();
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
unsigned int getNumMunition(WeaponMode* user) const;
unsigned int getNumMunitionInCurrentMagazine(WeaponMode* user) const;
unsigned int getNumMagazines() const;
@@ -67,7 +79,10 @@
{ return this->maxMagazines_; }
inline unsigned int getMaxMunitionPerMagazine() const
{ return this->maxMunitionPerMagazine_; }
+ inline MunitionDeployment::Value getMunitionDeployment() const
+ { return deployment_; }
+
bool canTakeMunition(unsigned int amount, WeaponMode* user) const;
bool takeMunition(unsigned int amount, WeaponMode* user);
@@ -81,7 +96,12 @@
bool addMunition(unsigned int amount);
bool canAddMagazines(unsigned int amount) const;
- bool addMagazines(unsigned int amount);
+ /**
+ @brief Try to add magazines.
+ @param amount The amount of magazines tried to add.
+ @return The amount of magazines sucessfully added.
+ */
+ unsigned int addMagazines(unsigned int amount);
bool canRemoveMagazines(unsigned int amount) const;
bool removeMagazines(unsigned int amount);
@@ -91,18 +111,24 @@
protected:
unsigned int maxMunitionPerMagazine_;
unsigned int maxMagazines_;
- unsigned int magazines_;
- std::map<WeaponMode*, Magazine*> currentMagazines_;
+ unsigned int unassignedMagazines_; // Number of magazines that are not assigned to a weapon mode. These are alway treated as full.
+ std::map<WeaponMode*, Magazine*> assignedMagazines_; // Maps weapon modes to magazines that are currently used.
- bool bUseSeparateMagazines_;
- bool bStackMunition_;
+ MunitionDeployment::Value deployment_; // Defines the behaviour how munition and magazines are distributed to the consuming weapon modes.
+
bool bAllowMunitionRefilling_;
bool bAllowMultiMunitionRemovementUnderflow_;
- float reloadTime_;
+ float reloadTime_; // The time needed to replace a magazine by a new one.
+ WeaponMode* lastFilledWeaponMode_; // Pointer to the weapon mode that got the last munition during the last call of addMunition.
private:
Magazine* getMagazine(WeaponMode* user) const;
+ inline void setMaxMagazines(unsigned int maxMagazines)
+ { this->maxMagazines_ = maxMagazines; }
+ inline void setMaxMunitionPerMagazine(unsigned int maxMunitionPerMagazine)
+ { this->maxMunitionPerMagazine_ = maxMunitionPerMagazine; }
+ void setNumMagazines(unsigned int numMagazines);
};
}
Copied: code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc (from rev 10960, code/branches/fabienHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc)
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc (rev 0)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,92 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file ReplenishingMunition.h
+ @brief Implementation of the ReplenishingMunition class.
+*/
+
+#include "ReplenishingMunition.h"
+
+#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+ RegisterClass(ReplenishingMunition);
+
+ ReplenishingMunition::ReplenishingMunition(Context* context) : Munition(context)
+ {
+ RegisterObject(ReplenishingMunition);
+
+ this->replenishInterval_ = 1.0f;
+ this->replenishAmount_ = 1;
+
+ // Use the timer to initialize itself after the first tick (because the real values for
+ // replenishIntervall_ and replenishMunitionAmount_ will be set in the constructor of the
+ // inheriting class, which comes after this constructor)
+ this->replenishingTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer, this)));
+ }
+
+ void ReplenishingMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(ReplenishingMunition, XMLPort, xmlelement, mode);
+
+ XMLPortParam(ReplenishingMunition, "replenishamount", setReplenishAmount, getReplenishAmount, xmlelement, mode);
+ XMLPortParam(ReplenishingMunition, "replenishinterval", setReplenishInterval, getReplenishInterval, xmlelement, mode);
+ }
+
+ float ReplenishingMunition::getProgress()
+ {
+ return replenishingTimer_.getRemainingTime()/this->replenishInterval_;
+ }
+
+ void ReplenishingMunition::initializeTimer()
+ {
+ // Initialize the timer
+ this->replenishingTimer_.setTimer(this->replenishInterval_, true, createExecutor(createFunctor(&ReplenishingMunition::replenish, this)));
+ }
+
+ void ReplenishingMunition::replenish()
+ {
+ if (this->canAddMagazines(this->replenishAmount_))
+ {
+ // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every
+ // case except the internal munition replenishing
+ bool temp = this->bAllowMunitionRefilling_;
+ this->bAllowMunitionRefilling_ = true;
+
+ // Replenish munition
+ this->addMagazines(this->replenishAmount_);
+
+ // Write back the temporary value
+ this->bAllowMunitionRefilling_ = temp;
+ }
+ }
+}
Copied: code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.h (from rev 10960, code/branches/fabienHS15/src/orxonox/weaponsystem/ReplenishingMunition.h)
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.h (rev 0)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -0,0 +1,81 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file ReplenishingMunition.h
+ @brief Definition of the ReplenishingMunition class.
+*/
+
+#ifndef _ReplenishingMunition_H__
+#define _ReplenishingMunition_H__
+
+#include "tools/Timer.h"
+#include "Munition.h"
+
+namespace orxonox
+{
+
+ /**
+ @brief
+ Munition that is replenished by a certain amount each time interval.
+ @author
+ Fabian 'x3n' Landau
+ @ingroup WeaponsMunitions
+ */
+ class _OrxonoxExport ReplenishingMunition : public Munition
+ {
+ public:
+ ReplenishingMunition(Context* context);
+ virtual ~ReplenishingMunition() {}
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+ virtual float getProgress();
+ inline float getReplenishAmount() const
+ { return replenishAmount_; }
+ inline float getReplenishInterval() const
+ { return replenishInterval_; }
+
+ protected:
+ float replenishInterval_; //!< The interval in which the munition is replenished.
+ unsigned int replenishAmount_; //!< The amount of magazines by which it is replenished.
+
+ private:
+ void replenish(); //!< Every call of this function replenishes the munition. This function is called by the timer.
+ void initializeTimer();
+
+ Timer replenishingTimer_; //!< Timer to do the replenishing.
+
+ inline void setReplenishAmount(unsigned int replenishAmount)
+ { this->replenishAmount_ = replenishAmount; }
+ inline void setReplenishInterval(float replenishInterval)
+ { this->replenishInterval_ = replenishInterval; }
+ };
+}
+
+#endif /* _ReplenishingMunition_H__ */
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -133,6 +133,10 @@
}
}
+ /**
+ @brief
+ Reload all @ref orxonox::WeaponMode weapon modes of this weapon.
+ */
void Weapon::reload()
{
for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
@@ -150,4 +154,10 @@
for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
it->second->setWeapon(this);
}
+
+ void Weapon::updateMunition()
+ {
+ for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
+ it->second->updateMunition();
+ }
}
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/Weapon.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -56,6 +56,10 @@
void addWeaponmode(WeaponMode* weaponmode);
WeaponMode* getWeaponmode(unsigned int index) const;
+ inline std::multimap<unsigned int, WeaponMode*>* getAllWeaponmodes()
+ { return &weaponmodes_; }
+ inline int getNumWeaponModes() const
+ { return weaponmodes_.size(); }
/**
@brief
@@ -74,6 +78,7 @@
{ this->weaponSlot_ = wSlot; }
inline WeaponSlot * getWeaponSlot() const
{ return this->weaponSlot_; }
+ void updateMunition();
private:
void reloaded();
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -74,6 +74,8 @@
this->muzzlePosition_ = Vector3::ZERO;
this->muzzleOrientation_ = Quaternion::IDENTITY;
+ hudImageString_ = "WSHUD_WM_Unknown";
+
if( GameMode::isMaster() )
{
this->defSndWpnFire_ = new WorldSound(this->getContext());
@@ -124,7 +126,8 @@
this->getWeapon()->attach(this->defSndWpnFire_);
this->bSoundAttached_ = true;
}
-
+
+ // Fireing is only possible if this weapon mode is not reloading and there is enough munition
if (!this->bReloading_ && this->munition_ && this->munition_->takeMunition(this->munitionPerShot_, this))
{
float tempReloadtime = this->reloadTime_;
@@ -133,13 +136,21 @@
{
if (this->munition_->reload(this))
{
+ // If true, the weapon reloads in parallel to the magazine reloading
if (this->bParallelReload_)
+ {
+ // The time needed to reload is the maximum of the reload time of the weapon mode and the magazine.
tempReloadtime = std::max(this->reloadTime_, this->munition_->getReloadTime());
+ }
else
+ {
+ // The time needed to reload is the sum of the reload time of the weapon mode and the magazine.
tempReloadtime = this->reloadTime_ + this->munition_->getReloadTime();
+ }
}
}
+ // Mark this weapon mode as reloading and start the reload timer
this->bReloading_ = true;
this->reloadTimer_.setInterval(tempReloadtime);
this->reloadTimer_.startTimer();
@@ -231,7 +242,9 @@
}
}
else
- this->munition_ = 0;
+ {
+ this->munition_ = NULL;
+ }
}
void WeaponMode::reloaded()
@@ -282,8 +295,10 @@
return BLANKSTRING;
}
- void WeaponMode::setDefaultSoundWithVolume(const std::string& soundPath, const float soundVolume){
- if (this->defSndWpnFire_) {
+ void WeaponMode::setDefaultSoundWithVolume(const std::string& soundPath, const float soundVolume)
+ {
+ if (this->defSndWpnFire_)
+ {
this->defSndWpnFire_->setSource(soundPath);
this->defSndWpnFire_->setVolume(soundVolume);
}
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponMode.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -37,6 +37,7 @@
#include "core/BaseObject.h"
#include "core/class/SubclassIdentifier.h"
#include "tools/Timer.h"
+#include "Munition.h"
namespace orxonox
{
@@ -103,6 +104,8 @@
{ this->bParallelReload_ = parallelreload; }
inline bool getParallelReload() const
{ return this->bParallelReload_; }
+ inline bool getReloading() const
+ { return this->bReloading_; }
// Fire
@@ -146,6 +149,10 @@
Vector3 getTarget();
+ inline const std::string& getHUDImageString() const
+ { return this->hudImageString_; }
+
+ void updateMunition();
protected:
virtual void fire() = 0;
@@ -154,16 +161,17 @@
unsigned int munitionPerShot_;
float reloadTime_;
- bool bAutoReload_;
- bool bParallelReload_;
+ bool bAutoReload_; // If true, the weapon reloads the magazine automatically.
+ bool bParallelReload_; // If true, the weapon reloads in parallel to the magazine reloading.
float damage_;
float healthdamage_;
float shielddamage_;
Vector3 muzzleOffset_;
- private:
- void updateMunition();
+ std::string hudImageString_;
+
+ private:
void reloaded();
Weapon* weapon_;
@@ -174,13 +182,13 @@
std::string munitionname_;
Timer reloadTimer_;
- bool bReloading_;
+ bool bReloading_; // If true, this weapon mode is marked as reloading.
Vector3 muzzlePosition_;
Quaternion muzzleOrientation_;
WorldSound* defSndWpnFire_;
- bool bSoundAttached_;
+ bool bSoundAttached_;
};
}
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -123,6 +123,11 @@
return 0;
}
+ std::vector<Weapon*>* WeaponPack::getAllWeapons()
+ {
+ return &weapons_;
+ }
+
void WeaponPack::addDefaultWeaponmodeLink(DefaultWeaponmodeLink* link)
{
this->links_.insert(link);
@@ -155,4 +160,10 @@
for (std::vector<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
(*it)->setWeaponPack(this);
}
+
+ void WeaponPack::updateMunition()
+ {
+ for (std::vector<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
+ (*it)->updateMunition();
+ }
}
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponPack.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -51,6 +51,7 @@
void addWeapon(Weapon * weapon);
void removeWeapon(Weapon * weapon);
Weapon * getWeapon(unsigned int index) const;
+ std::vector<Weapon*>* getAllWeapons();
inline size_t getNumWeapons() const
{ return this->weapons_.size(); }
@@ -64,6 +65,7 @@
{ this->weaponSystem_ = weaponSystem; this->notifyWeapons(); }
inline WeaponSystem * getWeaponSystem() const
{ return this->weaponSystem_; }
+ void updateMunition();
private:
void notifyWeapons();
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -239,6 +239,11 @@
return 0;
}
+ std::vector<WeaponPack *> * WeaponSystem::getAllWeaponPacks()
+ {
+ return &weaponPacks_;
+ }
+
bool WeaponSystem::swapWeaponSlots(WeaponSlot * wSlot1, WeaponSlot * wSlot2)
{
if (!wSlot1 || !wSlot2)
@@ -309,15 +314,37 @@
{
return it->second;
}
- else if (identifier->getIdentifier()->isA(Class(Munition)))
+ else
{
- Munition* munition = identifier->fabricate(this->getContext());
- this->munitions_[identifier->getIdentifier()] = munition;
- return munition;
+ return NULL;
}
+ }
+
+ void WeaponSystem::addMunition(Munition* munition)
+ {
+ if (munition == NULL)
+ {
+ return;
+ }
+
+ SubclassIdentifier<Munition> identifier = munition->getIdentifier();
+
+ if (identifier)
+ {
+ this->munitions_[identifier] = munition;
+ updateMunition();
+ }
else
{
- return 0;
+ orxout(internal_warning) << "Adding munition failed. identifier == NULL " << endl;
}
}
-}
+
+ void WeaponSystem::updateMunition()
+ {
+ for (std::vector<WeaponPack*>::iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)
+ {
+ (*it)->updateMunition();
+ }
+ }
+}
\ No newline at end of file
Modified: code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/weaponsystem/WeaponSystem.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -66,6 +66,7 @@
bool addWeaponPack(WeaponPack * wPack);
void removeWeaponPack(WeaponPack * wPack);
WeaponPack * getWeaponPack(unsigned int index) const;
+ std::vector<WeaponPack *> * getAllWeaponPacks();
// configure slots and firemodes
bool swapWeaponSlots(WeaponSlot * wSlot1, WeaponSlot * wSlot2);
@@ -75,6 +76,7 @@
void reload();
Munition * getMunition(SubclassIdentifier<Munition> * identifier);
+ void addMunition(Munition* munition);
inline void setPawn(Pawn * pawn)
{ this->pawn_ = pawn; }
@@ -94,6 +96,8 @@
static const unsigned int WEAPON_MODE_UNASSIGNED = static_cast<unsigned int>(-1);
private:
+ void updateMunition();
+
std::map<unsigned int, WeaponSet *> weaponSets_;
std::vector<WeaponSlot *> weaponSlots_;
std::vector<WeaponPack *> weaponPacks_;
Modified: code/branches/presentationHS15/src/orxonox/worldentities/MobileEntity.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/worldentities/MobileEntity.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/worldentities/MobileEntity.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -46,6 +46,8 @@
Every time the @see tick function is called the linear acceleration is multiplied by the time since the last call of tick and then added to the
linear velocity. Then the linear velocity is multiplied by the time since the last call of tick and then added to the position. The same happens with
the angular acceleration and velocity. With this procedure MobileEntities can change their position and orientation with time.
+
+ A MobileEntity can only have the collisition type WorldEntity::None, WorldEntity::Dynamic or WorldEntity::Kinematic. The collsion type WorldEntity::Static is illegal.
*/
class _OrxonoxExport MobileEntity : public WorldEntity, public Tickable
Modified: code/branches/presentationHS15/src/orxonox/worldentities/StaticEntity.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/worldentities/StaticEntity.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/worldentities/StaticEntity.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -43,6 +43,8 @@
In contrast to the MobileEntity the StaticEntity cannot move with respect to the parent to which it is attached. That's why
it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
function @see setPosition to changee it.
+
+ A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
*/
class _OrxonoxExport StaticEntity : public WorldEntity
Modified: code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -45,6 +45,7 @@
#include "weaponsystem/WeaponSlot.h"
#include "weaponsystem/WeaponPack.h"
#include "weaponsystem/WeaponSet.h"
+#include "weaponsystem/Munition.h"
#include "sound/WorldSound.h"
#include "controllers/FormationController.h"
@@ -60,7 +61,6 @@
RegisterObject(Pawn);
this->bAlive_ = true;
- this->bReload_ = false;
this->health_ = 0;
this->maxHealth_ = 0;
@@ -70,11 +70,10 @@
this->initialShieldHealth_ = 0;
this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max
this->shieldAbsorption_ = 0.5;
+ this->shieldRechargeRate_ = 0;
+ this->shieldRechargeWaitTime_ = 1.0f;
+ this->shieldRechargeWaitCountdown_ = 0;
- this->reloadRate_ = 0;
- this->reloadWaitTime_ = 1.0f;
- this->reloadWaitCountdown_ = 0;
-
this->lastHitOriginator_ = 0;
// set damage multiplier to default value 1, meaning nominal damage
@@ -140,10 +139,11 @@
XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode);
XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
- XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
+ XMLPortObject(Pawn, WeaponPack, "weaponpacks", addWeaponPackXML, getWeaponPack, xmlelement, mode);
+ XMLPortObject(Pawn, Munition, "munition", addMunitionXML, getMunitionXML, xmlelement, mode);
- XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
- XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
+ XMLPortParam(Pawn, "shieldrechargerate", setShieldRechargeRate, getShieldRechargeRate, xmlelement, mode).defaultValues(0);
+ XMLPortParam(Pawn, "shieldrechargewaittime", setShieldRechargeWaitTime, getShieldRechargeWaitTime, xmlelement, mode).defaultValues(1.0f);
XMLPortParam(Pawn, "explosionSound", setExplosionSound, getExplosionSound, xmlelement, mode);
@@ -152,31 +152,29 @@
void Pawn::registerVariables()
{
- registerVariable(this->bAlive_, VariableDirection::ToClient);
- registerVariable(this->health_, VariableDirection::ToClient);
- registerVariable(this->maxHealth_, VariableDirection::ToClient);
- registerVariable(this->shieldHealth_, VariableDirection::ToClient);
- registerVariable(this->maxShieldHealth_, VariableDirection::ToClient);
- registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
- registerVariable(this->bReload_, VariableDirection::ToServer);
- registerVariable(this->aimPosition_, VariableDirection::ToServer); // For the moment this variable gets only transfered to the server
+ registerVariable(this->bAlive_, VariableDirection::ToClient);
+ registerVariable(this->health_, VariableDirection::ToClient);
+ registerVariable(this->maxHealth_, VariableDirection::ToClient);
+ registerVariable(this->shieldHealth_, VariableDirection::ToClient);
+ registerVariable(this->maxShieldHealth_, VariableDirection::ToClient);
+ registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
+ registerVariable(this->aimPosition_, VariableDirection::ToServer); // For the moment this variable gets only transfered to the server
}
void Pawn::tick(float dt)
{
SUPER(Pawn, tick, dt);
- this->bReload_ = false;
-
+ // Recharge the shield
// TODO: use the existing timer functions instead
- if(this->reloadWaitCountdown_ > 0)
+ if(this->shieldRechargeWaitCountdown_ > 0)
{
- this->decreaseReloadCountdownTime(dt);
+ this->decreaseShieldRechargeCountdownTime(dt);
}
else
{
- this->addShieldHealth(this->getReloadRate() * dt);
- this->resetReloadCountdown();
+ this->addShieldHealth(this->getShieldRechargeRate() * dt);
+ this->resetShieldRechargeCountdown();
}
if (GameMode::isMaster())
@@ -228,19 +226,19 @@
this->maxShieldHealth_ = maxshieldhealth;
}
- void Pawn::setReloadRate(float reloadrate)
+ void Pawn::setShieldRechargeRate(float shieldRechargeRate)
{
- this->reloadRate_ = reloadrate;
+ this->shieldRechargeRate_ = shieldRechargeRate;
}
- void Pawn::setReloadWaitTime(float reloadwaittime)
+ void Pawn::setShieldRechargeWaitTime(float shieldRechargeWaitTime)
{
- this->reloadWaitTime_ = reloadwaittime;
+ this->shieldRechargeWaitTime_ = shieldRechargeWaitTime;
}
- void Pawn::decreaseReloadCountdownTime(float dt)
+ void Pawn::decreaseShieldRechargeCountdownTime(float dt)
{
- this->reloadWaitCountdown_ -= dt;
+ this->shieldRechargeWaitCountdown_ -= dt;
}
void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
@@ -251,6 +249,10 @@
if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
{
+ // Health-damage cannot be absorbed by shields.
+ // Shield-damage only reduces shield health.
+ // Normal damage can be (partially) absorbed by shields.
+
if (shielddamage >= this->getShieldHealth())
{
this->setShieldHealth(0);
@@ -479,11 +481,6 @@
this->weaponSystem_->fire(firemode);
}
- void Pawn::reload()
- {
- this->bReload_ = true;
- }
-
void Pawn::postSpawn()
{
this->setHealth(this->initialHealth_);
@@ -553,10 +550,41 @@
return 0;
}
+ std::vector<WeaponPack *> * Pawn::getAllWeaponPacks()
+ {
+ if (this->weaponSystem_)
+ return this->weaponSystem_->getAllWeaponPacks();
+ else
+ return 0;
+ }
+
+ void Pawn::addMunitionXML(Munition* munition)
+ {
+ if (this->weaponSystem_ && munition)
+ {
+ this->weaponSystem_->addMunition(munition);
+ }
+ }
+
+ Munition* Pawn::getMunitionXML() const
+ {
+ return NULL;
+ }
+
+ Munition* Pawn::getMunition(SubclassIdentifier<Munition> * identifier)
+ {
+ if (weaponSystem_)
+ {
+ return weaponSystem_->getMunition(identifier);
+ }
+
+ return NULL;
+ }
+
//Tell the Map (RadarViewable), if this is a playership
void Pawn::startLocalHumanControl()
{
-// SUPER(ControllableEntity, changedPlayer());
+// SUPER(ControllableEntity, startLocalHumanControl());
ControllableEntity::startLocalHumanControl();
this->isHumanShip_ = true;
}
@@ -613,4 +641,4 @@
assert(0);
return BLANKSTRING;
}
-}
+}
\ No newline at end of file
Modified: code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/worldentities/pawns/Pawn.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -41,11 +41,11 @@
{
/**
@brief
- Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
+ Everything in Orxonox that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at
or below zero. If it is, the pawn gets killed.
- Pawns can carry pickups and fire weapons. The can also have shields.
+ Pawns can carry pickups and fire weapons. They can also have shields.
Notice that every Pawn is a ControllableEntity.
*/
@@ -115,35 +115,31 @@
inline float getShieldAbsorption()
{ return this->shieldAbsorption_; }
- // TODO: Rename to shieldRechargeRate
- virtual void setReloadRate(float reloadrate);
- inline float getReloadRate() const
- { return this->reloadRate_; }
+ virtual void setShieldRechargeRate(float shieldRechargeRate);
+ inline float getShieldRechargeRate() const
+ { return this->shieldRechargeRate_; }
- virtual void setReloadWaitTime(float reloadwaittime);
- inline float getReloadWaitTime() const
- { return this->reloadWaitTime_; }
+ virtual void setShieldRechargeWaitTime(float shieldRechargeWaitTime);
+ inline float getShieldRechargeWaitTime() const
+ { return this->shieldRechargeWaitTime_; }
- inline void resetReloadCountdown()
- { this->reloadWaitCountdown_ = 0; }
+ inline void resetShieldRechargeCountdown()
+ { this->shieldRechargeWaitCountdown_ = 0; }
- inline void startReloadCountdown()
- { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } // TODO: Implement in Projectile.cc
+ inline void startShieldRechargeCountdown()
+ { this->shieldRechargeWaitCountdown_ = this->getShieldRechargeWaitTime(); } // TODO: Implement in Projectile.cc
- virtual void decreaseReloadCountdownTime(float dt);
+ virtual void decreaseShieldRechargeCountdownTime(float dt);
inline ControllableEntity* getLastHitOriginator() const
{ return this->lastHitOriginator_; }
- //virtual void hit(Pawn* originator, const Vector3& force, float damage);
- //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
virtual void hit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
virtual void kill();
virtual void fired(unsigned int firemode);
- virtual void reload();
virtual void postSpawn();
void addWeaponSlot(WeaponSlot * wSlot);
@@ -153,7 +149,13 @@
void addWeaponPack(WeaponPack * wPack);
void addWeaponPackXML(WeaponPack * wPack);
WeaponPack * getWeaponPack(unsigned int index) const;
+ std::vector<WeaponPack *> * getAllWeaponPacks();
+ void addMunitionXML(Munition* munition);
+ Munition* getMunitionXML() const;
+
+ Munition* getMunition(SubclassIdentifier<Munition> * identifier);
+
virtual void addedWeaponPack(WeaponPack* wPack) {}
inline void setSpawnParticleSource(const std::string& source)
@@ -206,7 +208,6 @@
virtual void deatheffect();
virtual void spawneffect();
- //virtual void damage(float damage, Pawn* originator = 0);
virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
bool bAlive_;
@@ -225,16 +226,15 @@
float maxShieldHealth_;
float initialShieldHealth_;
float shieldAbsorption_; ///< Has to be between 0 and 1
- float reloadRate_;
- float reloadWaitTime_;
- float reloadWaitCountdown_;
+ float shieldRechargeRate_;
+ float shieldRechargeWaitTime_;
+ float shieldRechargeWaitCountdown_;
float damageMultiplier_; ///< Used by the Damage Boost Pickup.
WeakPtr<Pawn> lastHitOriginator_;
WeaponSystem* weaponSystem_;
- bool bReload_;
std::string spawnparticlesource_;
float spawnparticleduration_;
Modified: code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.cc 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.cc 2015-12-09 13:45:58 UTC (rev 10961)
@@ -296,6 +296,24 @@
this->resetCamera();
}
}
+
+ void SpaceShip::gainBoostPower(float gainedBoostPower)
+ {
+ this->boostPower_ += gainedBoostPower;
+
+ if (this->boostPower_ > this->initialBoostPower_)
+ {
+ this->boostPower_ = this->initialBoostPower_;
+ }
+
+ // If the booster is in cooldown mode and we gained boost power, the abort the cooldown.
+ if (this->isBoostCoolingDown() && this->boostPower_ > 0.0f)
+ {
+ timer_.stopTimer();
+ this->boostCooledDown();
+ }
+ }
+
/**
@brief
Add an Engine to the SpaceShip.
Modified: code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.h 2015-12-09 11:47:30 UTC (rev 10960)
+++ code/branches/presentationHS15/src/orxonox/worldentities/pawns/SpaceShip.h 2015-12-09 13:45:58 UTC (rev 10961)
@@ -52,8 +52,10 @@
- The <b>rotationThrust</b>, specifies the force with which the SpaceShip rotates.
- 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.
- 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.
- - 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.
+ - 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.
+ A spaceship always needs to have the collision type "dynamic". Other collision types are illegal.
+
As mentioned @ref orxonox::Engine Engines can be mounted on the SpaceShip. Here is a (primitive) example of a SpaceShip defined in XML:
@code
<SpaceShip
@@ -249,6 +251,11 @@
*/
inline float getShakeAmplitude() const
{ return this->shakeAmplitude_; }
+ /**
+ @brief Add boost power. Is non-negative.
+ @return Returns the current boost power.
+ */
+ void gainBoostPower(float gainedBoostPower);
protected:
bool bInvertYAxis_;
@@ -261,7 +268,7 @@
bool bBoost_; //!< Whether the SpaceShip is currently boosting.
bool bBoostCooldown_; //!< Whether the SpaceShip is currently in boost cooldown, during which boosting is impossible.
float initialBoostPower_; //!< The initial (and maximal) boost power.
- float boostPower_; //!< The current boost power.
+ float boostPower_; //!< The current boost power. If the boost power is reduced to zero the boost cooldown will start.
float boostPowerRate_; //!< The rate at which the boost power is recharged.
float boostRate_; //!< The rate at which boost power is used up.
float boostCooldownDuration_; //!< The duration for which boost cooldown is in effect.
@@ -288,7 +295,7 @@
std::vector<Engine*> engineList_; //!< The list of all Engines mounted on this SpaceShip.
- Timer timer_; //!< Timer for the cooldown duration.
+ Timer timer_; //!< Timer for the cooldown of the boost.
float shakeDt_; //!< Temporary variable for the shaking of the camera.
Vector3 cameraOriginalPosition_; //!< The original position of the camera before shaking it.
Quaternion cameraOriginalOrientation_; //!< The original orientation of the camera before shaking it.
More information about the Orxonox-commit
mailing list