[Orxonox-commit 2414] r7129 - in code/branches/presentation3: data/gui/layouts data/gui/scripts data/levels data/levels/includes data/levels/templates data/particle src/modules/designtools src/modules/objects/triggers src/modules/pickup src/modules/pickup/items src/modules/weapons src/modules/weapons/projectiles src/modules/weapons/weaponmodes src/orxonox/graphics src/orxonox/interfaces src/orxonox/pickup src/orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Wed Jun 9 21:46:27 CEST 2010
Author: rgrieder
Date: 2010-06-09 21:46:26 +0200 (Wed, 09 Jun 2010)
New Revision: 7129
Modified:
code/branches/presentation3/data/gui/layouts/MiscConfigMenu.layout
code/branches/presentation3/data/gui/scripts/ChatBox-inputonly.lua
code/branches/presentation3/data/gui/scripts/ChatBox.lua
code/branches/presentation3/data/gui/scripts/HUDSheet.lua
code/branches/presentation3/data/gui/scripts/MenuSheet.lua
code/branches/presentation3/data/gui/scripts/MiscConfigMenu.lua
code/branches/presentation3/data/levels/Fight in our Back.oxw
code/branches/presentation3/data/levels/The Time Machine.oxw
code/branches/presentation3/data/levels/includes/pickups.oxi
code/branches/presentation3/data/levels/includes/weaponsettings_swallow.oxi
code/branches/presentation3/data/levels/screenshot.oxw
code/branches/presentation3/data/levels/templates/lodinformation.oxt
code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt
code/branches/presentation3/data/levels/templates/spaceship_swallow.oxt
code/branches/presentation3/data/particle/fog.particle
code/branches/presentation3/data/particle/rocketfire2.particle
code/branches/presentation3/data/particle/simplerocketfire.particle
code/branches/presentation3/src/modules/designtools/CreateStars.cc
code/branches/presentation3/src/modules/designtools/CreateStars.h
code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc
code/branches/presentation3/src/modules/designtools/ScreenshotManager.h
code/branches/presentation3/src/modules/objects/triggers/DistanceMultiTrigger.cc
code/branches/presentation3/src/modules/objects/triggers/DistanceMultiTrigger.h
code/branches/presentation3/src/modules/objects/triggers/DistanceTriggerBeacon.cc
code/branches/presentation3/src/modules/objects/triggers/DistanceTriggerBeacon.h
code/branches/presentation3/src/modules/objects/triggers/EventMultiTrigger.cc
code/branches/presentation3/src/modules/objects/triggers/EventMultiTrigger.h
code/branches/presentation3/src/modules/objects/triggers/MultiTrigger.cc
code/branches/presentation3/src/modules/objects/triggers/MultiTrigger.h
code/branches/presentation3/src/modules/objects/triggers/MultiTriggerContainer.cc
code/branches/presentation3/src/modules/objects/triggers/MultiTriggerContainer.h
code/branches/presentation3/src/modules/pickup/Pickup.cc
code/branches/presentation3/src/modules/pickup/Pickup.h
code/branches/presentation3/src/modules/pickup/PickupCollectionIdentifier.cc
code/branches/presentation3/src/modules/pickup/PickupCollectionIdentifier.h
code/branches/presentation3/src/modules/pickup/PickupManager.cc
code/branches/presentation3/src/modules/pickup/PickupManager.h
code/branches/presentation3/src/modules/pickup/PickupRepresentation.cc
code/branches/presentation3/src/modules/pickup/PickupRepresentation.h
code/branches/presentation3/src/modules/pickup/items/CMakeLists.txt
code/branches/presentation3/src/modules/pickup/items/InvisiblePickup.cc
code/branches/presentation3/src/modules/pickup/items/InvisiblePickup.h
code/branches/presentation3/src/modules/weapons/RocketController.cc
code/branches/presentation3/src/modules/weapons/RocketController.h
code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.cc
code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.h
code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.h
code/branches/presentation3/src/orxonox/graphics/AnimatedModel.cc
code/branches/presentation3/src/orxonox/graphics/AnimatedModel.h
code/branches/presentation3/src/orxonox/graphics/CEGuiSample.cc
code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h
code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
code/branches/presentation3/src/orxonox/interfaces/Pickupable.h
code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.cc
code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.h
code/branches/presentation3/src/orxonox/sound/SoundStreamer.cc
code/branches/presentation3/src/orxonox/sound/SoundStreamer.h
Log:
svn:eol-style "native" for all text-based files.
Property changes on: code/branches/presentation3/data/gui/layouts/MiscConfigMenu.layout
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/gui/scripts/ChatBox-inputonly.lua
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/gui/scripts/ChatBox.lua
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/gui/scripts/HUDSheet.lua
===================================================================
--- code/branches/presentation3/data/gui/scripts/HUDSheet.lua 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/gui/scripts/HUDSheet.lua 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,15 +1,15 @@
--- HUDSheet.lua
-
-local P = {} -- Local alias, always use it in this file
-HUDSheet = P -- Global name
-setmetatable(P, require("GUISheet")) -- Inherit from GUISheet
-P.__index = P -- Provide class character
-
--- Use this function to construct a new HUDSheet
-function P.new(name)
- local newSheet = GUISheet.new(name)
- setmetatable(newSheet, P)
- return newSheet
-end
-
-return P
+-- HUDSheet.lua
+
+local P = {} -- Local alias, always use it in this file
+HUDSheet = P -- Global name
+setmetatable(P, require("GUISheet")) -- Inherit from GUISheet
+P.__index = P -- Provide class character
+
+-- Use this function to construct a new HUDSheet
+function P.new(name)
+ local newSheet = GUISheet.new(name)
+ setmetatable(newSheet, P)
+ return newSheet
+end
+
+return P
Property changes on: code/branches/presentation3/data/gui/scripts/HUDSheet.lua
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/gui/scripts/MenuSheet.lua
===================================================================
--- code/branches/presentation3/data/gui/scripts/MenuSheet.lua 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/gui/scripts/MenuSheet.lua 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,36 +1,36 @@
--- MenuSheet.lua
--- Base class for all GUI sheets that represent a menu.
--- Inherits itself from GUISheet
-
-local P = {} -- Local alias, always use it in this file
-MenuSheet = P -- Global name
-setmetatable(P, require("GUISheet")) -- Inherit from GUISheet
-P.__index = P -- Provide class character
-
--- Use this function to construct a new MenuSheet.
--- Parameters:
--- Except for _name, you can provide nil. Then the default value will be used.
--- For _tShowCusor and _tUseKeyboard you can specify TriBool.Dontcare if the value doesn't matter at all. Then the value of the underlaying sheet will be used.
-function P.new(_name, _bHidePrevious, _tShowCursor, _tUseKeyboard, _bBlockJoyStick)
- local newSheet = GUISheet.new(_name)
- newSheet.bHidePrevious = handleDefArg(_bHidePrevious, true)
- newSheet.tShowCursor = handleDefArg(_tShowCusor, TriBool.True)
- newSheet.tUseKeyboard = handleDefArg(_tUseKeyboard, TriBool.Dontcare)
- newSheet.bBlockJoyStick = handleDefArg(_bBlockJoyStick, false)
-
- setmetatable(newSheet, P)
- return newSheet
-end
-
-function P:load()
- -- Create the input state
- self.inputState = guiMgr:createInputState("GUI_" .. self.name,
- self.tShowCursor, self.tUseKeyboard, self.bBlockJoyStick)
-
- -- load() of base 'class'
- GUISheet.load(self)
-
- return self
-end
-
-return P
+-- MenuSheet.lua
+-- Base class for all GUI sheets that represent a menu.
+-- Inherits itself from GUISheet
+
+local P = {} -- Local alias, always use it in this file
+MenuSheet = P -- Global name
+setmetatable(P, require("GUISheet")) -- Inherit from GUISheet
+P.__index = P -- Provide class character
+
+-- Use this function to construct a new MenuSheet.
+-- Parameters:
+-- Except for _name, you can provide nil. Then the default value will be used.
+-- For _tShowCusor and _tUseKeyboard you can specify TriBool.Dontcare if the value doesn't matter at all. Then the value of the underlaying sheet will be used.
+function P.new(_name, _bHidePrevious, _tShowCursor, _tUseKeyboard, _bBlockJoyStick)
+ local newSheet = GUISheet.new(_name)
+ newSheet.bHidePrevious = handleDefArg(_bHidePrevious, true)
+ newSheet.tShowCursor = handleDefArg(_tShowCusor, TriBool.True)
+ newSheet.tUseKeyboard = handleDefArg(_tUseKeyboard, TriBool.Dontcare)
+ newSheet.bBlockJoyStick = handleDefArg(_bBlockJoyStick, false)
+
+ setmetatable(newSheet, P)
+ return newSheet
+end
+
+function P:load()
+ -- Create the input state
+ self.inputState = guiMgr:createInputState("GUI_" .. self.name,
+ self.tShowCursor, self.tUseKeyboard, self.bBlockJoyStick)
+
+ -- load() of base 'class'
+ GUISheet.load(self)
+
+ return self
+end
+
+return P
Property changes on: code/branches/presentation3/data/gui/scripts/MenuSheet.lua
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/gui/scripts/MiscConfigMenu.lua
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/levels/Fight in our Back.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/levels/The Time Machine.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/levels/includes/pickups.oxi
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/levels/includes/weaponsettings_swallow.oxi
===================================================================
--- code/branches/presentation3/data/levels/includes/weaponsettings_swallow.oxi 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/levels/includes/weaponsettings_swallow.oxi 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,33 +1,33 @@
- <weaponslots>
- <WeaponSlot position=" 7.8,1.8,-19" />
- <WeaponSlot position="-7.8,1.8,-19" />
- <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>
- <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.2,0.3,0.5" />
- </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.2,0.3,0.5" />
- </Weapon>
- <Weapon>
- <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
- </Weapon>
- </WeaponPack>
- </weapons>
+ <weaponslots>
+ <WeaponSlot position=" 7.8,1.8,-19" />
+ <WeaponSlot position="-7.8,1.8,-19" />
+ <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>
+ <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.2,0.3,0.5" />
+ </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.2,0.3,0.5" />
+ </Weapon>
+ <Weapon>
+ <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
+ </Weapon>
+ </WeaponPack>
+ </weapons>
Property changes on: code/branches/presentation3/data/levels/includes/weaponsettings_swallow.oxi
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/levels/screenshot.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/levels/templates/lodinformation.oxt
===================================================================
--- code/branches/presentation3/data/levels/templates/lodinformation.oxt 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/levels/templates/lodinformation.oxt 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,18 +1,18 @@
-<Template name=lodtemplate_default defaults=false>
- <Level>
- <lodinformation>
- <MeshLodInformation mesh=Carrier.mesh lodQuality=1.8 />
- <MeshLodInformation mesh=assff.mesh lodQuality=3 />
- <MeshLodInformation mesh=rocket.mesh lodQuality=5 enabled=true />
- <MeshLodInformation mesh=laserbeam.mesh enabled=false />
- <MeshLodInformation mesh=HXY.mesh enabled=true numLevels=8 />
- <MeshLodInformation mesh=Transporter.mesh enabled=true numLevels=8 />
- <MeshLodInformation mesh=CuboidConnBody.mesh enabled=false/>
- <MeshLodInformation mesh=CuboidBody.mesh enabled=false/>
- <MeshLodInformation mesh=DoubleCuboidBody.mesh enabled=false/>
- <MeshLodInformation mesh=SemiCircleCockpit.mesh enabled=false/>
- <MeshLodInformation mesh=SolarPanel.mesh enabled=false/>
- <MeshLodInformation mesh=CuboidLandingZone.mesh enabled=false/>
- </lodinformation>
- </Level>
-</Template>
+<Template name=lodtemplate_default defaults=false>
+ <Level>
+ <lodinformation>
+ <MeshLodInformation mesh=Carrier.mesh lodQuality=1.8 />
+ <MeshLodInformation mesh=assff.mesh lodQuality=3 />
+ <MeshLodInformation mesh=rocket.mesh lodQuality=5 enabled=true />
+ <MeshLodInformation mesh=laserbeam.mesh enabled=false />
+ <MeshLodInformation mesh=HXY.mesh enabled=true numLevels=8 />
+ <MeshLodInformation mesh=Transporter.mesh enabled=true numLevels=8 />
+ <MeshLodInformation mesh=CuboidConnBody.mesh enabled=false/>
+ <MeshLodInformation mesh=CuboidBody.mesh enabled=false/>
+ <MeshLodInformation mesh=DoubleCuboidBody.mesh enabled=false/>
+ <MeshLodInformation mesh=SemiCircleCockpit.mesh enabled=false/>
+ <MeshLodInformation mesh=SolarPanel.mesh enabled=false/>
+ <MeshLodInformation mesh=CuboidLandingZone.mesh enabled=false/>
+ </lodinformation>
+ </Level>
+</Template>
Property changes on: code/branches/presentation3/data/levels/templates/lodinformation.oxt
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt
===================================================================
--- code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,481 +1,481 @@
-<!-- Shield pickups: -->
-
-<Template name=smallshieldpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.3 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=smallshieldpickup>
- <ShieldPickup
- duration = 10
- shieldabsorption = 0.7
- shieldhealth = 300
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=mediumshieldpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.5 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=mediumshieldpickup>
- <ShieldPickup
- duration = 30
- shieldabsorption = 0.8
- shieldhealth = 500
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-
-<Template name=hugeshieldpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.7 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=hugeshieldpickup>
- <ShieldPickup
- duration = 60
- shieldabsorption = 0.95
- shieldhealth = 700
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<!-- Health pickups: -->
-
-<Template name=smallhealthpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=0.3 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=smallhealthpickup>
- <HealthPickup
- health = 10
- healthType = "limited"
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=mediumhealthpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=0.5 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=mediumhealthpickup>
- <HealthPickup
- health = 50
- healthType = "limited"
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=hugehealthpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=0.7 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=hugehealthpickup>
- <HealthPickup
- health = 100
- healthType = "limited"
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=crazyhealthpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=1.2 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=crazyhealthpickup>
- <HealthPickup
- health = 1000
- healthType = "permanent"
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<!-- Meta pickups: -->
-
-<Template name=usepickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.60,0.97,0.23" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.40,0.81,0.10" material="Arrow" scale=0.65 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</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>
- <attached>
- <Billboard position="0,0,0" colour="0.95,0.20,0.10" material="Arrow" scale=0.65 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<!-- Speed pickups -->
-
-<Template name=smallspeedpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.3 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=smallspeedpickup>
- <SpeedPickup
- duration = 10.0
- speedAdd = 0.0
- SpeedMultiply = 10.0
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=mediumspeedpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.5 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=mediumspeedpickup>
- <SpeedPickup
- duration = 10.0
- speedAdd = 0.0
- SpeedMultiply = 25.0
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=hugespeedpickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.7 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=hugespeedpickup>
- <SpeedPickup
- duration = 10.0
- speedAdd = 0.0
- SpeedMultiply = 50.0
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=smalljumppickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="1,0,0" material="3arrowsup" scale=0.3 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=smalljumppickup>
- <SpeedPickup
- duration = 0.7
- speedAdd = 5000.0
- SpeedMultiply = 1.0
- activationType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<!-- Invisible pickups -->
-
-<Template name=smallinvisiblepickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.22,0.32,0.86" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.06,0.14,0.63" material="Eye" scale=0.5 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=smallinvisiblepickup>
- <InvisiblePickup
- duration = 5.0
- activaionType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=mediuminvisiblepickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.22,0.32,0.86" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.06,0.14,0.63" material="Eye" scale=0.7 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=mediuminvisiblepickup>
- <InvisiblePickup
- duration = 10.0
- activaionType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<Template name=hugeinvisiblepickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.22,0.32,0.86" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,0,0" colour="0.06,0.14,0.63" material="Eye" scale=0.9 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=hugeinvisiblepickup>
- <InvisiblePickup
- duration = 20.0
- activaionType = "immediate"
- durationType = "once"
- />
-</Template>
-
-<!-- Pickup Collection pickups -->
-
-<Template name=triplehealthspeedinvisibilitypickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.95,0.85,0.27" material="Sphere2" scale=0.1>
- <attached>
- <Billboard position="0,20,0" colour="0.36,0.81,0.10" material="Cross" scale=0.25 />
- <Billboard position="-20,-10,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.25 />
- <Billboard position="20,-10,0" colour="0.06,0.14,0.63" material="Eye" scale=0.35 />
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=triplehealthspeedinvisibilitypickup>
- <PickupCollection>
- <pickupables>
- <HealthPickup template=mediumhealthpickup />
- <SpeedPickup template=mediumspeedpickup />
- <InvisiblePickup template=mediuminvisiblepickup />
- </pickupables>
- </PickupCollection>
-</Template>
-
-<!-- Drone Pickup -->
-
-<Template name=droneTemplate>
- <Drone name="meineDrohne" mass= "50" linearDamping = "0.7" angularDamping = "0.99999" maxDistanceToOwner_=150 minDistanceToOwner_=75 maxShootingRange_=1000 primaryThrust_=250 auxilaryThrust_=250 rotationThrust_=50>
- <attached>
- <Model scale="1" mesh="drone.mesh"/>
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="1, 1, 1" />
- </collisionShapes>
- <weaponslots>
- <WeaponSlot position=" 0, 0,0" />
- </weaponslots>
- <weaponsets>
- <WeaponSet firemode=0 />
- </weaponsets>
- <weapons>
- <WeaponPack>
- <links>
- <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
- </links>
- <Weapon>
- <attached>
- <Model mesh="hs-w01.mesh" roll="195" position="0,1,0" scale=2 />
- <Model mesh="hs-w01s.mesh" roll="195" position="0.1,0.5,0" scale=2 />
- </attached>
- <HsW01 mode=0 munitionpershot=0 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.7, 1.5,-4" />
- <HsW01 mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare" muzzleoffset="-0.9, 1.1,-4" />
- </Weapon>
- </WeaponPack>
- </weapons>
- </Drone>
-</Template>
-
-<Template name=dronepickupRepresentation>
- <PickupRepresentation>
- <spawner-representation>
- <StaticEntity>
- <attached>
- <Billboard position="0,0,0" colour="0.96,0.35,0.02" material="Sphere2" scale=0.1>
- <attached>
- <Model scale="5" mesh="drone.mesh"/>
- </attached>
- </Billboard>
- </attached>
- </StaticEntity>
- </spawner-representation>
- </PickupRepresentation>
-</Template>
-
-<Template name=dronepickup>
- <DronePickup droneTemplate=droneTemplate />
-</Template>
-
+<!-- Shield pickups: -->
+
+<Template name=smallshieldpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.3 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smallshieldpickup>
+ <ShieldPickup
+ duration = 10
+ shieldabsorption = 0.7
+ shieldhealth = 300
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=mediumshieldpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.5 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=mediumshieldpickup>
+ <ShieldPickup
+ duration = 30
+ shieldabsorption = 0.8
+ shieldhealth = 500
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+
+<Template name=hugeshieldpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.7 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=hugeshieldpickup>
+ <ShieldPickup
+ duration = 60
+ shieldabsorption = 0.95
+ shieldhealth = 700
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<!-- Health pickups: -->
+
+<Template name=smallhealthpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=0.3 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smallhealthpickup>
+ <HealthPickup
+ health = 10
+ healthType = "limited"
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=mediumhealthpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=0.5 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=mediumhealthpickup>
+ <HealthPickup
+ health = 50
+ healthType = "limited"
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=hugehealthpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=0.7 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=hugehealthpickup>
+ <HealthPickup
+ health = 100
+ healthType = "limited"
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=crazyhealthpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.36,0.81,0.10" material="Cross" scale=1.2 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=crazyhealthpickup>
+ <HealthPickup
+ health = 1000
+ healthType = "permanent"
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<!-- Meta pickups: -->
+
+<Template name=usepickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.60,0.97,0.23" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.40,0.81,0.10" material="Arrow" scale=0.65 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</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>
+ <attached>
+ <Billboard position="0,0,0" colour="0.95,0.20,0.10" material="Arrow" scale=0.65 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<!-- Speed pickups -->
+
+<Template name=smallspeedpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.3 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smallspeedpickup>
+ <SpeedPickup
+ duration = 10.0
+ speedAdd = 0.0
+ SpeedMultiply = 10.0
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=mediumspeedpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.5 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=mediumspeedpickup>
+ <SpeedPickup
+ duration = 10.0
+ speedAdd = 0.0
+ SpeedMultiply = 25.0
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=hugespeedpickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.7 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=hugespeedpickup>
+ <SpeedPickup
+ duration = 10.0
+ speedAdd = 0.0
+ SpeedMultiply = 50.0
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=smalljumppickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="1,0,0" material="3arrowsup" scale=0.3 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smalljumppickup>
+ <SpeedPickup
+ duration = 0.7
+ speedAdd = 5000.0
+ SpeedMultiply = 1.0
+ activationType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<!-- Invisible pickups -->
+
+<Template name=smallinvisiblepickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.22,0.32,0.86" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.06,0.14,0.63" material="Eye" scale=0.5 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=smallinvisiblepickup>
+ <InvisiblePickup
+ duration = 5.0
+ activaionType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=mediuminvisiblepickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.22,0.32,0.86" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.06,0.14,0.63" material="Eye" scale=0.7 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=mediuminvisiblepickup>
+ <InvisiblePickup
+ duration = 10.0
+ activaionType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<Template name=hugeinvisiblepickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.22,0.32,0.86" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,0,0" colour="0.06,0.14,0.63" material="Eye" scale=0.9 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=hugeinvisiblepickup>
+ <InvisiblePickup
+ duration = 20.0
+ activaionType = "immediate"
+ durationType = "once"
+ />
+</Template>
+
+<!-- Pickup Collection pickups -->
+
+<Template name=triplehealthspeedinvisibilitypickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.95,0.85,0.27" material="Sphere2" scale=0.1>
+ <attached>
+ <Billboard position="0,20,0" colour="0.36,0.81,0.10" material="Cross" scale=0.25 />
+ <Billboard position="-20,-10,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.25 />
+ <Billboard position="20,-10,0" colour="0.06,0.14,0.63" material="Eye" scale=0.35 />
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=triplehealthspeedinvisibilitypickup>
+ <PickupCollection>
+ <pickupables>
+ <HealthPickup template=mediumhealthpickup />
+ <SpeedPickup template=mediumspeedpickup />
+ <InvisiblePickup template=mediuminvisiblepickup />
+ </pickupables>
+ </PickupCollection>
+</Template>
+
+<!-- Drone Pickup -->
+
+<Template name=droneTemplate>
+ <Drone name="meineDrohne" mass= "50" linearDamping = "0.7" angularDamping = "0.99999" maxDistanceToOwner_=150 minDistanceToOwner_=75 maxShootingRange_=1000 primaryThrust_=250 auxilaryThrust_=250 rotationThrust_=50>
+ <attached>
+ <Model scale="1" mesh="drone.mesh"/>
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="1, 1, 1" />
+ </collisionShapes>
+ <weaponslots>
+ <WeaponSlot position=" 0, 0,0" />
+ </weaponslots>
+ <weaponsets>
+ <WeaponSet firemode=0 />
+ </weaponsets>
+ <weapons>
+ <WeaponPack>
+ <links>
+ <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+ </links>
+ <Weapon>
+ <attached>
+ <Model mesh="hs-w01.mesh" roll="195" position="0,1,0" scale=2 />
+ <Model mesh="hs-w01s.mesh" roll="195" position="0.1,0.5,0" scale=2 />
+ </attached>
+ <HsW01 mode=0 munitionpershot=0 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.7, 1.5,-4" />
+ <HsW01 mode=0 munitionpershot=0 delay=0 material="Flares/point_lensflare" muzzleoffset="-0.9, 1.1,-4" />
+ </Weapon>
+ </WeaponPack>
+ </weapons>
+ </Drone>
+</Template>
+
+<Template name=dronepickupRepresentation>
+ <PickupRepresentation>
+ <spawner-representation>
+ <StaticEntity>
+ <attached>
+ <Billboard position="0,0,0" colour="0.96,0.35,0.02" material="Sphere2" scale=0.1>
+ <attached>
+ <Model scale="5" mesh="drone.mesh"/>
+ </attached>
+ </Billboard>
+ </attached>
+ </StaticEntity>
+ </spawner-representation>
+ </PickupRepresentation>
+</Template>
+
+<Template name=dronepickup>
+ <DronePickup droneTemplate=droneTemplate />
+</Template>
+
Property changes on: code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/levels/templates/spaceship_swallow.oxt
===================================================================
--- code/branches/presentation3/data/levels/templates/spaceship_swallow.oxt 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/levels/templates/spaceship_swallow.oxt 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,83 +1,83 @@
-<Template name=spaceshipswallow>
- <SpaceShip
- hudtemplate = spaceshiphud
- camerapositiontemplate = spaceshipswallowcameras
- engine = spaceshipswallowengine
- spawnparticlesource = "Orxonox/fairytwirl"
- spawnparticleduration = 3
- explosionchunks = 6
-
- health = 100
- maxhealth = 200
- initialhealth = 100
-
- primaryThrust = 100;
- auxilaryThrust = 30;
- rotationThrust = 25;
-
- collisionType = "dynamic"
- mass = 100
- linearDamping = 0.7
- angularDamping = 0.9999999
- >
- <attached>
- <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=2 mesh="swallow_mat.mesh" />
- <BlinkingBillboard position=" 24.2,0.9,-11.5" material="Examples/Flare" colour="1.0, 1.0, 1" amplitude=0.04 frequency=1 quadratic=1 />
- <BlinkingBillboard position="-24.2,0.9,-11.5" material="Examples/Flare" colour="1.0, 1.0, 1" amplitude=0.04 frequency=1 quadratic=1 phase="90"/>
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="10, 3, 5" />
- <BoxCollisionShape position="13,-1.3,0" halfExtents="3, 1, 2" />
- <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
- <BoxCollisionShape position="0,0,7" halfExtents="3, 2, 2" />
- <BoxCollisionShape position="0,0.1,-11" halfExtents="2.2, 1.8, 6" />
- <BoxCollisionShape position="0,0.1,-19" halfExtents="1.4, 1, 2" />
- </collisionShapes>
-
-<?lua
- include("includes/weaponsettings_swallow.oxi")
-?>
- </SpaceShip>
-</Template>
-
-<Template name=spaceshipswallowcameras defaults=0>
- <SpaceShip>
- <camerapositions>
- <CameraPosition position="0,10, 60"drag=true mouselook=true />
- <CameraPosition position="0,30, 120" drag=true mouselook=true />
- <CameraPosition position="0,50,180" drag=true mouselook=true />
- <CameraPosition position="0,80,10" pitch="-80" drag=true mouselook=true />
- </camerapositions>
- </SpaceShip>
-</Template>
-
-<Template name=spaceshipswallowengine baseclass=MultiStateEngine>
- <MultiStateEngine
- boostfactor = 2
-
- speedfront = 150
- speedback = 50
- speedleftright = 50
- speedupdown = 50
-
- accelerationfront = 500
- accelerationbrake = 500
- accelerationback = 125
- accelerationleftright = 125
- accelerationupdown = 125
- >
-
- <EffectContainer condition="normal or boost">
- <Backlight mainstate=activity active=false scale=0.2 name=bltest position=" 7, 1, 22.2" colour="1, 0.5, 0.2, 0.4" width=20 length=800 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
- <Backlight mainstate=activity active=false scale=0.2 name=bltest position="-7, 1, 22.2" colour="1, 0.5, 0.2, 0.4" width=20 length=800 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
- </EffectContainer>
- <EffectContainer condition="boost">
- <Backlight mainstate=activity active=false scale=0.2 name=bltest position=" 2, 1, 23.2" colour="1, 0.5, 0.2, 1" width=30 length=1600 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
- <Backlight mainstate=activity active=false scale=0.2 name=bltest position=" -2, 1, 23.2" colour="1, 0.5, 0.2, 1" width=30 length=1600 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
- </EffectContainer>
- <EffectContainer condition="brake">
- <FadingBillboard mainstate=activity active=false scale=0.1 position=" 4.4, -5.5, 5" colour="0.8, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
- <FadingBillboard mainstate=activity active=false scale=0.1 position="-4.4, -5.5, 5" colour="0.8, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
- </EffectContainer>
- </MultiStateEngine>
-</Template>
+<Template name=spaceshipswallow>
+ <SpaceShip
+ hudtemplate = spaceshiphud
+ camerapositiontemplate = spaceshipswallowcameras
+ engine = spaceshipswallowengine
+ spawnparticlesource = "Orxonox/fairytwirl"
+ spawnparticleduration = 3
+ explosionchunks = 6
+
+ health = 100
+ maxhealth = 200
+ initialhealth = 100
+
+ primaryThrust = 100;
+ auxilaryThrust = 30;
+ rotationThrust = 25;
+
+ collisionType = "dynamic"
+ mass = 100
+ linearDamping = 0.7
+ angularDamping = 0.9999999
+ >
+ <attached>
+ <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=2 mesh="swallow_mat.mesh" />
+ <BlinkingBillboard position=" 24.2,0.9,-11.5" material="Examples/Flare" colour="1.0, 1.0, 1" amplitude=0.04 frequency=1 quadratic=1 />
+ <BlinkingBillboard position="-24.2,0.9,-11.5" material="Examples/Flare" colour="1.0, 1.0, 1" amplitude=0.04 frequency=1 quadratic=1 phase="90"/>
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="10, 3, 5" />
+ <BoxCollisionShape position="13,-1.3,0" halfExtents="3, 1, 2" />
+ <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
+ <BoxCollisionShape position="0,0,7" halfExtents="3, 2, 2" />
+ <BoxCollisionShape position="0,0.1,-11" halfExtents="2.2, 1.8, 6" />
+ <BoxCollisionShape position="0,0.1,-19" halfExtents="1.4, 1, 2" />
+ </collisionShapes>
+
+<?lua
+ include("includes/weaponsettings_swallow.oxi")
+?>
+ </SpaceShip>
+</Template>
+
+<Template name=spaceshipswallowcameras defaults=0>
+ <SpaceShip>
+ <camerapositions>
+ <CameraPosition position="0,10, 60"drag=true mouselook=true />
+ <CameraPosition position="0,30, 120" drag=true mouselook=true />
+ <CameraPosition position="0,50,180" drag=true mouselook=true />
+ <CameraPosition position="0,80,10" pitch="-80" drag=true mouselook=true />
+ </camerapositions>
+ </SpaceShip>
+</Template>
+
+<Template name=spaceshipswallowengine baseclass=MultiStateEngine>
+ <MultiStateEngine
+ boostfactor = 2
+
+ speedfront = 150
+ speedback = 50
+ speedleftright = 50
+ speedupdown = 50
+
+ accelerationfront = 500
+ accelerationbrake = 500
+ accelerationback = 125
+ accelerationleftright = 125
+ accelerationupdown = 125
+ >
+
+ <EffectContainer condition="normal or boost">
+ <Backlight mainstate=activity active=false scale=0.2 name=bltest position=" 7, 1, 22.2" colour="1, 0.5, 0.2, 0.4" width=20 length=800 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+ <Backlight mainstate=activity active=false scale=0.2 name=bltest position="-7, 1, 22.2" colour="1, 0.5, 0.2, 0.4" width=20 length=800 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+ </EffectContainer>
+ <EffectContainer condition="boost">
+ <Backlight mainstate=activity active=false scale=0.2 name=bltest position=" 2, 1, 23.2" colour="1, 0.5, 0.2, 1" width=30 length=1600 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+ <Backlight mainstate=activity active=false scale=0.2 name=bltest position=" -2, 1, 23.2" colour="1, 0.5, 0.2, 1" width=30 length=1600 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+ </EffectContainer>
+ <EffectContainer condition="brake">
+ <FadingBillboard mainstate=activity active=false scale=0.1 position=" 4.4, -5.5, 5" colour="0.8, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+ <FadingBillboard mainstate=activity active=false scale=0.1 position="-4.4, -5.5, 5" colour="0.8, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+ </EffectContainer>
+ </MultiStateEngine>
+</Template>
Property changes on: code/branches/presentation3/data/levels/templates/spaceship_swallow.oxt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/data/particle/fog.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/particle/rocketfire2.particle
===================================================================
--- code/branches/presentation3/data/particle/rocketfire2.particle 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/particle/rocketfire2.particle 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,50 +1,50 @@
-particle_system Orxonox/rocketfire2
-{
- quota 300
- material PE/explosion
- particle_width 5
- particle_height 2
- cull_each false
- renderer billboard
- sorted false
- local_space false
- iteration_interval 0
- nonvisible_update_timeout 0
- billboard_type point
- billboard_origin center
- billboard_rotation_type texcoord
- common_up_vector 0 1 0
- point_rendering false
- accurate_facing false
-
- emitter Ellipsoid
- {
- angle 2
- colour 1 0.682759 1 1
- colour_range_start 1 0.682759 1 1
- colour_range_end 1 0.682759 1 1
- direction 0 0 1
- emission_rate 1200
- position 0 0 3
- velocity 10
- velocity_min 10
- velocity_max 48
- time_to_live 0.1
- time_to_live_min 0.1
- time_to_live_max 0.2
- duration 0
- duration_min 0
- duration_max 0
- repeat_delay 0
- repeat_delay_min 0
- repeat_delay_max 0
- width 0.8
- height 0.8
- depth 4
- }
-
- affector Scaler
- {
- rate -20
- }
-}
+particle_system Orxonox/rocketfire2
+{
+ quota 300
+ material PE/explosion
+ particle_width 5
+ particle_height 2
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Ellipsoid
+ {
+ angle 2
+ colour 1 0.682759 1 1
+ colour_range_start 1 0.682759 1 1
+ colour_range_end 1 0.682759 1 1
+ direction 0 0 1
+ emission_rate 1200
+ position 0 0 3
+ velocity 10
+ velocity_min 10
+ velocity_max 48
+ time_to_live 0.1
+ time_to_live_min 0.1
+ time_to_live_max 0.2
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ width 0.8
+ height 0.8
+ depth 4
+ }
+
+ affector Scaler
+ {
+ rate -20
+ }
+}
Property changes on: code/branches/presentation3/data/particle/rocketfire2.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/data/particle/simplerocketfire.particle
===================================================================
--- code/branches/presentation3/data/particle/simplerocketfire.particle 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/data/particle/simplerocketfire.particle 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,50 +1,50 @@
- particle_system Orxonox/simplerocketfire
-{
- quota 300
- material PE/explosion
- particle_width 5
- particle_height 2
- cull_each false
- renderer billboard
- sorted false
- local_space false
- iteration_interval 0
- nonvisible_update_timeout 0
- billboard_type point
- billboard_origin center
- billboard_rotation_type texcoord
- common_up_vector 0 1 0
- point_rendering false
- accurate_facing false
-
- emitter Ellipsoid
- {
- angle 2
- colour 1 0.682759 1 1
- colour_range_start 1 0.682759 1 1
- colour_range_end 1 0.682759 1 1
- direction 0 0 1
- emission_rate 1200
- position 0 0 3
- velocity 10
- velocity_min 10
- velocity_max 48
- time_to_live 0.1
- time_to_live_min 0.1
- time_to_live_max 0.2
- duration 0
- duration_min 0
- duration_max 0
- repeat_delay 0
- repeat_delay_min 0
- repeat_delay_max 0
- width 0.8
- height 0.8
- depth 7
- }
-
- affector Scaler
- {
- rate -20
- }
-}
+ particle_system Orxonox/simplerocketfire
+{
+ quota 300
+ material PE/explosion
+ particle_width 5
+ particle_height 2
+ cull_each false
+ renderer billboard
+ sorted false
+ local_space false
+ iteration_interval 0
+ nonvisible_update_timeout 0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ common_up_vector 0 1 0
+ point_rendering false
+ accurate_facing false
+
+ emitter Ellipsoid
+ {
+ angle 2
+ colour 1 0.682759 1 1
+ colour_range_start 1 0.682759 1 1
+ colour_range_end 1 0.682759 1 1
+ direction 0 0 1
+ emission_rate 1200
+ position 0 0 3
+ velocity 10
+ velocity_min 10
+ velocity_max 48
+ time_to_live 0.1
+ time_to_live_min 0.1
+ time_to_live_max 0.2
+ duration 0
+ duration_min 0
+ duration_max 0
+ repeat_delay 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ width 0.8
+ height 0.8
+ depth 7
+ }
+
+ affector Scaler
+ {
+ rate -20
+ }
+}
Property changes on: code/branches/presentation3/data/particle/simplerocketfire.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/designtools/CreateStars.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/designtools/CreateStars.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc
===================================================================
--- code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc 2010-06-09 19:46:26 UTC (rev 7129)
@@ -158,16 +158,16 @@
std::string ScreenshotManager::getTimestamp()
{
- struct tm *pTime;
- time_t ctTime; time(&ctTime);
- pTime = localtime( &ctTime );
- std::ostringstream oss;
- oss << std::setw(2) << std::setfill('0') << (pTime->tm_mon + 1)
- << std::setw(2) << std::setfill('0') << pTime->tm_mday
- << std::setw(2) << std::setfill('0') << (pTime->tm_year + 1900)
- << "_" << std::setw(2) << std::setfill('0') << pTime->tm_hour
- << std::setw(2) << std::setfill('0') << pTime->tm_min
- << std::setw(2) << std::setfill('0') << pTime->tm_sec;
+ struct tm *pTime;
+ time_t ctTime; time(&ctTime);
+ pTime = localtime( &ctTime );
+ std::ostringstream oss;
+ oss << std::setw(2) << std::setfill('0') << (pTime->tm_mon + 1)
+ << std::setw(2) << std::setfill('0') << pTime->tm_mday
+ << std::setw(2) << std::setfill('0') << (pTime->tm_year + 1900)
+ << "_" << std::setw(2) << std::setfill('0') << pTime->tm_hour
+ << std::setw(2) << std::setfill('0') << pTime->tm_min
+ << std::setw(2) << std::setfill('0') << pTime->tm_sec;
return oss.str();
}
Property changes on: code/branches/presentation3/src/modules/designtools/ScreenshotManager.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/designtools/ScreenshotManager.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/DistanceMultiTrigger.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/DistanceMultiTrigger.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/DistanceTriggerBeacon.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/DistanceTriggerBeacon.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/EventMultiTrigger.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/EventMultiTrigger.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/MultiTrigger.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/MultiTrigger.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/MultiTriggerContainer.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/objects/triggers/MultiTriggerContainer.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/Pickup.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/Pickup.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/PickupCollectionIdentifier.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/PickupCollectionIdentifier.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/PickupManager.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/PickupManager.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/PickupRepresentation.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/PickupRepresentation.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/items/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/items/InvisiblePickup.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/modules/pickup/items/InvisiblePickup.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/weapons/RocketController.cc
===================================================================
--- code/branches/presentation3/src/modules/weapons/RocketController.cc 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/weapons/RocketController.cc 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,115 +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:
-* Gabriel Nadler, Originalfile: Oli Scheuss
-* Co-authors:
-* ...
-*
-*/
-
-#include "RocketController.h"
-#include "projectiles/SimpleRocket.h"
-#include "util/Math.h"
-#include "weapons/projectiles/SimpleRocket.h"
-#include "util/Debug.h"
-#include "weapons/weaponmodes/SimpleRocketFire.h"
-#include "worldentities/pawns/Pawn.h"
-
-namespace orxonox
-{
- /**
- @brief
- Constructor.
- */
- RocketController::RocketController(BaseObject* creator) : Controller(creator)
- {
- RegisterObject(RocketController);
- COUT(5)<< "RocketController constructed\n";
-
-
- this->rocket_ = new SimpleRocket(this);
- this->rocket_->setController(this);
- this->setControllableEntity(dynamic_cast<ControllableEntity*> (this->rocket_));
- }
-
-
- /**
- @brief
- The controlling happens here. This method defines what the controller has to do each tick.
- @param dt
- The duration of the tick.
- */
- void RocketController::tick(float dt)
- {
-
- if (this->target_ && this->rocket_->hasFuel()) {
- this->setTargetPosition();
- this->moveToTargetPosition();
- }
-
-
- }
-
-
- RocketController::~RocketController()
- {
- COUT(5)<< "RocketController destroyed\n";
- }
-
- void RocketController::setTargetPosition()
- {
- this->targetPosition_=this->target_->getWorldPosition(); //don't really note a difference in the rocket behaviour xD
- //this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(),this->getControllableEntity()->getVelocity().length() , this->target_->getWorldPosition(), this->target_->getVelocity());
- }
- void RocketController::moveToTargetPosition()
- {
- this->moveToPosition(this->targetPosition_);
- }
-
-
-
- void RocketController::setTarget(WorldEntity* target)
- {
- this->target_ = target;
- }
-
- void RocketController::moveToPosition(const Vector3& target)
- {
- if (!this->getControllableEntity())
- return;
-
- Vector2 coord = get2DViewdirection(this->rocket_->getPosition(), this->rocket_->getOrientation() * WorldEntity::FRONT, this->rocket_->getOrientation() * WorldEntity::UP, target);
- float distance = (target - this->rocket_->getWorldPosition()).length();
-
-
- if (distance > 1000 && this->rocket_->getVelocity().squaredLength()<160000)
- this->rocket_->setAcceleration(this->rocket_->getOrientation()*Vector3(-20,-20,-20));
- if (distance <1000) this->rocket_->setAcceleration(0,0,0);
-
- this->rocket_->rotateYaw(-sgn(coord.x)*coord.x*coord.x);
- this->rocket_->rotatePitch(sgn(coord.y)*coord.y*coord.y);
- }
-
-
-
-
-}
+/*
+* 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:
+* Gabriel Nadler, Originalfile: Oli Scheuss
+* Co-authors:
+* ...
+*
+*/
+
+#include "RocketController.h"
+#include "projectiles/SimpleRocket.h"
+#include "util/Math.h"
+#include "weapons/projectiles/SimpleRocket.h"
+#include "util/Debug.h"
+#include "weapons/weaponmodes/SimpleRocketFire.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ Constructor.
+ */
+ RocketController::RocketController(BaseObject* creator) : Controller(creator)
+ {
+ RegisterObject(RocketController);
+ COUT(5)<< "RocketController constructed\n";
+
+
+ this->rocket_ = new SimpleRocket(this);
+ this->rocket_->setController(this);
+ this->setControllableEntity(dynamic_cast<ControllableEntity*> (this->rocket_));
+ }
+
+
+ /**
+ @brief
+ The controlling happens here. This method defines what the controller has to do each tick.
+ @param dt
+ The duration of the tick.
+ */
+ void RocketController::tick(float dt)
+ {
+
+ if (this->target_ && this->rocket_->hasFuel()) {
+ this->setTargetPosition();
+ this->moveToTargetPosition();
+ }
+
+
+ }
+
+
+ RocketController::~RocketController()
+ {
+ COUT(5)<< "RocketController destroyed\n";
+ }
+
+ void RocketController::setTargetPosition()
+ {
+ this->targetPosition_=this->target_->getWorldPosition(); //don't really note a difference in the rocket behaviour xD
+ //this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(),this->getControllableEntity()->getVelocity().length() , this->target_->getWorldPosition(), this->target_->getVelocity());
+ }
+ void RocketController::moveToTargetPosition()
+ {
+ this->moveToPosition(this->targetPosition_);
+ }
+
+
+
+ void RocketController::setTarget(WorldEntity* target)
+ {
+ this->target_ = target;
+ }
+
+ void RocketController::moveToPosition(const Vector3& target)
+ {
+ if (!this->getControllableEntity())
+ return;
+
+ Vector2 coord = get2DViewdirection(this->rocket_->getPosition(), this->rocket_->getOrientation() * WorldEntity::FRONT, this->rocket_->getOrientation() * WorldEntity::UP, target);
+ float distance = (target - this->rocket_->getWorldPosition()).length();
+
+
+ if (distance > 1000 && this->rocket_->getVelocity().squaredLength()<160000)
+ this->rocket_->setAcceleration(this->rocket_->getOrientation()*Vector3(-20,-20,-20));
+ if (distance <1000) this->rocket_->setAcceleration(0,0,0);
+
+ this->rocket_->rotateYaw(-sgn(coord.x)*coord.x*coord.x);
+ this->rocket_->rotatePitch(sgn(coord.y)*coord.y*coord.y);
+ }
+
+
+
+
+}
Property changes on: code/branches/presentation3/src/modules/weapons/RocketController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/weapons/RocketController.h
===================================================================
--- code/branches/presentation3/src/modules/weapons/RocketController.h 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/weapons/RocketController.h 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,73 +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 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:
- * Gabriel Nadler, Originalfile: Oli Scheuss
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _RocketController_H__
-#define _RocketController_H__
-
-#include "weapons/WeaponsPrereqs.h"
-
-#include "controllers/Controller.h"
-#include "tools/interfaces/Tickable.h"
-#include "weapons/projectiles/SimpleRocket.h"
-#include "weapons/weaponmodes/SimpleRocketFire.h"
-
-namespace orxonox
-{
- /**
- @brief
- Controller for the Rocket (targetseeking)
- @author
- Gabriel Nadler, Originalfile: Oli Scheuss
- */
- class _WeaponsExport RocketController : public Controller, public Tickable
- {
- public:
- RocketController(BaseObject* creator);
- virtual ~RocketController();
-
- virtual void tick(float dt);
- SimpleRocket* getRocket() const
- { return this->rocket_; };
- void setTarget(WorldEntity* target);
- protected:
- void moveToPosition(const Vector3& target);
- void setTargetPosition();
- void moveToTargetPosition();
-
- private:
- SimpleRocket* rocket_; //!<The Rocket it controlls
- Vector3 targetPosition_;
- WeakPtr<PlayerInfo> player_;
-
- WeakPtr<WorldEntity> target_;
-
-
- };
-}
-
-#endif /* _RocketController_H__ */
+/*
+ * 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:
+ * Gabriel Nadler, Originalfile: Oli Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _RocketController_H__
+#define _RocketController_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "controllers/Controller.h"
+#include "tools/interfaces/Tickable.h"
+#include "weapons/projectiles/SimpleRocket.h"
+#include "weapons/weaponmodes/SimpleRocketFire.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ Controller for the Rocket (targetseeking)
+ @author
+ Gabriel Nadler, Originalfile: Oli Scheuss
+ */
+ class _WeaponsExport RocketController : public Controller, public Tickable
+ {
+ public:
+ RocketController(BaseObject* creator);
+ virtual ~RocketController();
+
+ virtual void tick(float dt);
+ SimpleRocket* getRocket() const
+ { return this->rocket_; };
+ void setTarget(WorldEntity* target);
+ protected:
+ void moveToPosition(const Vector3& target);
+ void setTargetPosition();
+ void moveToTargetPosition();
+
+ private:
+ SimpleRocket* rocket_; //!<The Rocket it controlls
+ Vector3 targetPosition_;
+ WeakPtr<PlayerInfo> player_;
+
+ WeakPtr<WorldEntity> target_;
+
+
+ };
+}
+
+#endif /* _RocketController_H__ */
Property changes on: code/branches/presentation3/src/modules/weapons/RocketController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.cc 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.cc 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,258 +1,258 @@
-/*
- * 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:
- * Oliver Scheuss
- * Co-authors:
- * ...
- *
- */
-
-#include "SimpleRocket.h"
-
-#include <BulletDynamics/Dynamics/btRigidBody.h>
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "worldentities/pawns/Pawn.h"
-#include "graphics/ParticleSpawner.h"
-#include "graphics/Model.h"
-#include "objects/collisionshapes/ConeCollisionShape.h"
-#include "infos/PlayerInfo.h"
-#include "controllers/Controller.h"
-#include "weapons/RocketController.h"
-#include "sound/WorldSound.h"
-#include "util/Debug.h"
-
-namespace orxonox
-{
-
- CreateFactory(SimpleRocket);
-
- SimpleRocket::SimpleRocket(BaseObject* creator) : ControllableEntity(creator)
- {
- RegisterObject(SimpleRocket);// - register the SimpleRocket class to the core
-
- this->localAngularVelocity_ = 0;
- this->bDestroy_ = false;
- this->lifetime_ = 120;
-
- this->setMass(15);
- COUT(4) << "simplerocket constructed\n";
-
- if (GameMode::isMaster())
- {
- this->setCollisionType(WorldEntity::Kinematic);
- this->fuel_=true;
-
- Model* model = new Model(this);
- model->setMeshSource("rocket.mesh");
- model->scale(0.7f);
- this->attach(model);
-
- this->fire_ = new ParticleEmitter(this);
- this->attach(this->fire_);
-
- this->fire_->setOrientation(this->getOrientation());
- this->fire_->setSource("Orxonox/simplerocketfire");
- this->enableCollisionCallback();
- this->setCollisionResponse(false);
- this->setCollisionType(Kinematic);
-
- // TODO: fix the orientation and size of this collision shape to match the rocket
- ConeCollisionShape* collisionShape = new ConeCollisionShape(this);
- collisionShape->setOrientation(this->getOrientation());
- collisionShape->setRadius(1.5f);
- collisionShape->setHeight(5);
- this->attachCollisionShape(collisionShape);
- this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&SimpleRocket::destroyObject, this)));
- }
-
- }
-
-
-
- /**
- * @brief updates state of rocket, disables fire if no fuel
- * @param dt tick-length
- */
- void SimpleRocket::tick(float dt)
- {
-
- SUPER(SimpleRocket, tick, dt);
- if ( GameMode::isMaster() )
- {
-
-
- this->setAngularVelocity(this->getOrientation() * this->localAngularVelocity_);
- this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
- this->localAngularVelocity_ = 0;
-
-
- if (this->fuel_)
- {
- if (this->destroyTimer_.getRemainingTime()< (static_cast<float>(this->FUEL_PERCENTAGE)/100) *this->lifetime_ )
- this->fuel_=false;
- } else
- this->disableFire();
-
- if( this->bDestroy_ )
- this->destroy();
- }
-
- }
-
- /**
- * @brief Sets the Acceleration to 0 and detaches the fire
- * @return void
- */
- void SimpleRocket::disableFire()
- {
- this->setAcceleration(0,0,0);
- this->fire_->detachFromParent();
- }
-
- /**s
- @brief
- Destructor. Destroys controller, if present and kills sounds, if playing.
- */
- SimpleRocket::~SimpleRocket()
- {
- if (this->isInitialized())
- {
- if( GameMode::isMaster() )
- {
- this->getController()->destroy();
- }
- }
- }
-
- /**
- @brief
- Method for creating a SimpleRocket through XML.
- */
- void SimpleRocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- // this calls the XMLPort function of the parent class
- SUPER(SimpleRocket, XMLPort, xmlelement, mode);
- }
-
- void SimpleRocket::setOwner(Pawn* owner)
- {
- this->owner_ = owner;
- this->player_ = this->owner_->getPlayer();
- }
-
-
-
-
- bool SimpleRocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
- {
- if (!this->bDestroy_ && GameMode::isMaster())
- {
- if (otherObject == this->owner_)
- return false;
-
- this->bDestroy_ = true;
-
- if (this->owner_)
- {
- {
- ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
- effect->setPosition(this->getPosition());
- effect->setOrientation(this->getOrientation());
- effect->setDestroyAfterLife(true);
- effect->setSource("Orxonox/explosion4");
- effect->setLifetime(2.0f);
- }
-
- {
- ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
- effect->setPosition(this->getPosition());
- effect->setOrientation(this->getOrientation());
- effect->setDestroyAfterLife(true);
- effect->setSource("Orxonox/smoke4");
- effect->setLifetime(3.0f);
- }
- }
-
- float dmg = this->damage_;
-// if (this->owner_)
-// dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false);
-
- Pawn* victim = orxonox_cast<Pawn*>(otherObject);
- if (victim)
- victim->hit(this->owner_, contactPoint, dmg);
- }
- return false;
- }
-
- void SimpleRocket::destroyObject()
- {
- if (GameMode::isMaster())
- {
- this->destroy();
- }
- }
-
- /**
- @brief
- Rotates the SimpleRocket around the y-axis by the amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the angular movement.
- */
- void SimpleRocket::rotateYaw(const Vector2& value)
- {
- ControllableEntity::rotateYaw(value);
-
- if( !this->isInMouseLook() )
- this->localAngularVelocity_.y += value.x;
- }
-
- /**
- @brief
- Rotates the SimpleRocket around the x-axis by the amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the angular movement.
- */
- void SimpleRocket::rotatePitch(const Vector2& value)
- {
- ControllableEntity::rotatePitch(value);
-
- if( !this->isInMouseLook() )
- this->localAngularVelocity_.x += value.x;
- }
-
- /**
- @brief
- Rotates the SimpleRocket around the z-axis by the amount specified by the first component of the input 2-dim vector.
- @param value
- The vector determining the amount of the angular movement.
- */
- void SimpleRocket::rotateRoll(const Vector2& value)
- {
- ControllableEntity::rotateRoll(value);
-
- if( !this->isInMouseLook() )
- this->localAngularVelocity_.z += value.x;
- }
-
-}
+/*
+ * 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:
+ * Oliver Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "SimpleRocket.h"
+
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/pawns/Pawn.h"
+#include "graphics/ParticleSpawner.h"
+#include "graphics/Model.h"
+#include "objects/collisionshapes/ConeCollisionShape.h"
+#include "infos/PlayerInfo.h"
+#include "controllers/Controller.h"
+#include "weapons/RocketController.h"
+#include "sound/WorldSound.h"
+#include "util/Debug.h"
+
+namespace orxonox
+{
+
+ CreateFactory(SimpleRocket);
+
+ SimpleRocket::SimpleRocket(BaseObject* creator) : ControllableEntity(creator)
+ {
+ RegisterObject(SimpleRocket);// - register the SimpleRocket class to the core
+
+ this->localAngularVelocity_ = 0;
+ this->bDestroy_ = false;
+ this->lifetime_ = 120;
+
+ this->setMass(15);
+ COUT(4) << "simplerocket constructed\n";
+
+ if (GameMode::isMaster())
+ {
+ this->setCollisionType(WorldEntity::Kinematic);
+ this->fuel_=true;
+
+ Model* model = new Model(this);
+ model->setMeshSource("rocket.mesh");
+ model->scale(0.7f);
+ this->attach(model);
+
+ this->fire_ = new ParticleEmitter(this);
+ this->attach(this->fire_);
+
+ this->fire_->setOrientation(this->getOrientation());
+ this->fire_->setSource("Orxonox/simplerocketfire");
+ this->enableCollisionCallback();
+ this->setCollisionResponse(false);
+ this->setCollisionType(Kinematic);
+
+ // TODO: fix the orientation and size of this collision shape to match the rocket
+ ConeCollisionShape* collisionShape = new ConeCollisionShape(this);
+ collisionShape->setOrientation(this->getOrientation());
+ collisionShape->setRadius(1.5f);
+ collisionShape->setHeight(5);
+ this->attachCollisionShape(collisionShape);
+ this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&SimpleRocket::destroyObject, this)));
+ }
+
+ }
+
+
+
+ /**
+ * @brief updates state of rocket, disables fire if no fuel
+ * @param dt tick-length
+ */
+ void SimpleRocket::tick(float dt)
+ {
+
+ SUPER(SimpleRocket, tick, dt);
+ if ( GameMode::isMaster() )
+ {
+
+
+ this->setAngularVelocity(this->getOrientation() * this->localAngularVelocity_);
+ this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
+ this->localAngularVelocity_ = 0;
+
+
+ if (this->fuel_)
+ {
+ if (this->destroyTimer_.getRemainingTime()< (static_cast<float>(this->FUEL_PERCENTAGE)/100) *this->lifetime_ )
+ this->fuel_=false;
+ } else
+ this->disableFire();
+
+ if( this->bDestroy_ )
+ this->destroy();
+ }
+
+ }
+
+ /**
+ * @brief Sets the Acceleration to 0 and detaches the fire
+ * @return void
+ */
+ void SimpleRocket::disableFire()
+ {
+ this->setAcceleration(0,0,0);
+ this->fire_->detachFromParent();
+ }
+
+ /**s
+ @brief
+ Destructor. Destroys controller, if present and kills sounds, if playing.
+ */
+ SimpleRocket::~SimpleRocket()
+ {
+ if (this->isInitialized())
+ {
+ if( GameMode::isMaster() )
+ {
+ this->getController()->destroy();
+ }
+ }
+ }
+
+ /**
+ @brief
+ Method for creating a SimpleRocket through XML.
+ */
+ void SimpleRocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ // this calls the XMLPort function of the parent class
+ SUPER(SimpleRocket, XMLPort, xmlelement, mode);
+ }
+
+ void SimpleRocket::setOwner(Pawn* owner)
+ {
+ this->owner_ = owner;
+ this->player_ = this->owner_->getPlayer();
+ }
+
+
+
+
+ bool SimpleRocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+ {
+ if (!this->bDestroy_ && GameMode::isMaster())
+ {
+ if (otherObject == this->owner_)
+ return false;
+
+ this->bDestroy_ = true;
+
+ if (this->owner_)
+ {
+ {
+ ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+ effect->setPosition(this->getPosition());
+ effect->setOrientation(this->getOrientation());
+ effect->setDestroyAfterLife(true);
+ effect->setSource("Orxonox/explosion4");
+ effect->setLifetime(2.0f);
+ }
+
+ {
+ ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+ effect->setPosition(this->getPosition());
+ effect->setOrientation(this->getOrientation());
+ effect->setDestroyAfterLife(true);
+ effect->setSource("Orxonox/smoke4");
+ effect->setLifetime(3.0f);
+ }
+ }
+
+ float dmg = this->damage_;
+// if (this->owner_)
+// dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false);
+
+ Pawn* victim = orxonox_cast<Pawn*>(otherObject);
+ if (victim)
+ victim->hit(this->owner_, contactPoint, dmg);
+ }
+ return false;
+ }
+
+ void SimpleRocket::destroyObject()
+ {
+ if (GameMode::isMaster())
+ {
+ this->destroy();
+ }
+ }
+
+ /**
+ @brief
+ Rotates the SimpleRocket around the y-axis by the amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the angular movement.
+ */
+ void SimpleRocket::rotateYaw(const Vector2& value)
+ {
+ ControllableEntity::rotateYaw(value);
+
+ if( !this->isInMouseLook() )
+ this->localAngularVelocity_.y += value.x;
+ }
+
+ /**
+ @brief
+ Rotates the SimpleRocket around the x-axis by the amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the angular movement.
+ */
+ void SimpleRocket::rotatePitch(const Vector2& value)
+ {
+ ControllableEntity::rotatePitch(value);
+
+ if( !this->isInMouseLook() )
+ this->localAngularVelocity_.x += value.x;
+ }
+
+ /**
+ @brief
+ Rotates the SimpleRocket around the z-axis by the amount specified by the first component of the input 2-dim vector.
+ @param value
+ The vector determining the amount of the angular movement.
+ */
+ void SimpleRocket::rotateRoll(const Vector2& value)
+ {
+ ControllableEntity::rotateRoll(value);
+
+ if( !this->isInMouseLook() )
+ this->localAngularVelocity_.z += value.x;
+ }
+
+}
Property changes on: code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.h
===================================================================
--- code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.h 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.h 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,143 +1,143 @@
-/*
- * 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:
- * Oliver Scheuss
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _SimpleRocket_H__
-#define _SimpleRocket_H__
-
-#include "weapons/WeaponsPrereqs.h"
-
-#include "tools/Timer.h"
-#include "worldentities/ControllableEntity.h"
-#include "graphics/ParticleSpawner.h"
-
-namespace orxonox
-{
- class ConeCollisionShape;
-
- /**
- @brief
- SimpleRocket, follows direction from a Rocketcontroller, has fuel for 80% of its lifetime, afterwards it's fire disappears.
- @author
- Gabriel Nadler (Original file: Oli Scheuss)
- */
- class _WeaponsExport SimpleRocket : public ControllableEntity
- {
- public:
- SimpleRocket(BaseObject* creator);
- virtual ~SimpleRocket();
- virtual void tick(float dt);
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a SimpleRocket through XML.
-
- virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
- void destroyObject();
-
- void disableFire(); //!< Method to disable the fire and stop all acceleration
-
- virtual void moveFrontBack(const Vector2& value){}
- virtual void moveRightLeft(const Vector2& value){}
- virtual void moveUpDown(const Vector2& value){}
-
- virtual void rotateYaw(const Vector2& value);
- virtual void rotatePitch(const Vector2& value);
- virtual void rotateRoll(const Vector2& value);
- void setDestroy();
-
- /**
- @brief Moves the SimpleRocket in the Front/Back-direction by the specifed amount.
- @param value The amount by which the SimpleRocket is to be moved.
- */
- inline void moveFrontBack(float value)
- { this->moveFrontBack(Vector2(value, 0)); }
- /**
- @brief Moves the SimpleRocket in the Right/Left-direction by the specifed amount.
- @param value The amount by which the SimpleRocket is to be moved.
- */
- inline void moveRightLeft(float value)
- { this->moveRightLeft(Vector2(value, 0)); }
- /**
- @brief Moves the SimpleRocket in the Up/Down-direction by the specifed amount.
- @param value The amount by which the SimpleRocket is to be moved.
- */
- inline void moveUpDown(float value)
- { this->moveUpDown(Vector2(value, 0)); }
-
- /**
- @brief Rotates the SimpleRocket around the y-axis by the specifed amount.
- @param value The amount by which the SimpleRocket is to be rotated.
- */
- inline void rotateYaw(float value)
- { this->rotateYaw(Vector2(value, 0)); }
- /**
- @brief Rotates the SimpleRocket around the x-axis by the specifed amount.
- @param value The amount by which the SimpleRocket is to be rotated.
- */
- inline void rotatePitch(float value)
- {
- this->rotatePitch(Vector2(value, 0)); }
- /**
- @brief Rotates the SimpleRocket around the z-axis by the specifed amount.
- @param value The amount by which the SimpleRocket is to be rotated.
- */
- inline void rotateRoll(float value)
- {
- this->rotateRoll(Vector2(value, 0)); }
-
- void setOwner(Pawn* owner);
- inline Pawn* getOwner() const
- { return this->owner_; }
- inline bool hasFuel() const
- { return this->fuel_; }
-
- inline void setDamage(float damage)
- { this->damage_ = damage; }
- inline float getDamage() const
- { return this->damage_; }
-
-
- private:
- WeakPtr<Pawn> owner_;
- Vector3 localAngularVelocity_;
- float damage_;
- bool bDestroy_;
- bool fuel_; //!< Bool is true while the rocket "has fuel"
-
-
- WeakPtr<PlayerInfo> player_;
- Timer destroyTimer_;
- float lifetime_;
- static const int FUEL_PERCENTAGE=80; //!<Percentage of Lifetime the rocket has fuel
-
- ParticleEmitter* fire_; //!< Fire-Emittor
-
-
-
- };
-
-}
-
-#endif /* _SimpleRocket_H__ */
+/*
+ * 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:
+ * Oliver Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _SimpleRocket_H__
+#define _SimpleRocket_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "worldentities/ControllableEntity.h"
+#include "graphics/ParticleSpawner.h"
+
+namespace orxonox
+{
+ class ConeCollisionShape;
+
+ /**
+ @brief
+ SimpleRocket, follows direction from a Rocketcontroller, has fuel for 80% of its lifetime, afterwards it's fire disappears.
+ @author
+ Gabriel Nadler (Original file: Oli Scheuss)
+ */
+ class _WeaponsExport SimpleRocket : public ControllableEntity
+ {
+ public:
+ SimpleRocket(BaseObject* creator);
+ virtual ~SimpleRocket();
+ virtual void tick(float dt);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a SimpleRocket through XML.
+
+ virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+ void destroyObject();
+
+ void disableFire(); //!< Method to disable the fire and stop all acceleration
+
+ virtual void moveFrontBack(const Vector2& value){}
+ virtual void moveRightLeft(const Vector2& value){}
+ virtual void moveUpDown(const Vector2& value){}
+
+ virtual void rotateYaw(const Vector2& value);
+ virtual void rotatePitch(const Vector2& value);
+ virtual void rotateRoll(const Vector2& value);
+ void setDestroy();
+
+ /**
+ @brief Moves the SimpleRocket in the Front/Back-direction by the specifed amount.
+ @param value The amount by which the SimpleRocket is to be moved.
+ */
+ inline void moveFrontBack(float value)
+ { this->moveFrontBack(Vector2(value, 0)); }
+ /**
+ @brief Moves the SimpleRocket in the Right/Left-direction by the specifed amount.
+ @param value The amount by which the SimpleRocket is to be moved.
+ */
+ inline void moveRightLeft(float value)
+ { this->moveRightLeft(Vector2(value, 0)); }
+ /**
+ @brief Moves the SimpleRocket in the Up/Down-direction by the specifed amount.
+ @param value The amount by which the SimpleRocket is to be moved.
+ */
+ inline void moveUpDown(float value)
+ { this->moveUpDown(Vector2(value, 0)); }
+
+ /**
+ @brief Rotates the SimpleRocket around the y-axis by the specifed amount.
+ @param value The amount by which the SimpleRocket is to be rotated.
+ */
+ inline void rotateYaw(float value)
+ { this->rotateYaw(Vector2(value, 0)); }
+ /**
+ @brief Rotates the SimpleRocket around the x-axis by the specifed amount.
+ @param value The amount by which the SimpleRocket is to be rotated.
+ */
+ inline void rotatePitch(float value)
+ {
+ this->rotatePitch(Vector2(value, 0)); }
+ /**
+ @brief Rotates the SimpleRocket around the z-axis by the specifed amount.
+ @param value The amount by which the SimpleRocket is to be rotated.
+ */
+ inline void rotateRoll(float value)
+ {
+ this->rotateRoll(Vector2(value, 0)); }
+
+ void setOwner(Pawn* owner);
+ inline Pawn* getOwner() const
+ { return this->owner_; }
+ inline bool hasFuel() const
+ { return this->fuel_; }
+
+ inline void setDamage(float damage)
+ { this->damage_ = damage; }
+ inline float getDamage() const
+ { return this->damage_; }
+
+
+ private:
+ WeakPtr<Pawn> owner_;
+ Vector3 localAngularVelocity_;
+ float damage_;
+ bool bDestroy_;
+ bool fuel_; //!< Bool is true while the rocket "has fuel"
+
+
+ WeakPtr<PlayerInfo> player_;
+ Timer destroyTimer_;
+ float lifetime_;
+ static const int FUEL_PERCENTAGE=80; //!<Percentage of Lifetime the rocket has fuel
+
+ ParticleEmitter* fire_; //!< Fire-Emittor
+
+
+
+ };
+
+}
+
+#endif /* _SimpleRocket_H__ */
Property changes on: code/branches/presentation3/src/modules/weapons/projectiles/SimpleRocket.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
===================================================================
--- code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,77 +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:
- * Oliver Scheuss
- * Co-authors:
- * ...
- *
- */
-
-#include "SimpleRocketFire.h"
-
-#include "util/Math.h"
-#include "core/CoreIncludes.h"
-#include "weapons/RocketController.h"
-
-#include "weaponsystem/Weapon.h"
-#include "weaponsystem/WeaponPack.h"
-#include "weaponsystem/WeaponSystem.h"
-#include "worldentities/pawns/Pawn.h"
-#include "sound/WorldSound.h"
-
-namespace orxonox
-{
-
- CreateFactory(SimpleRocketFire);
-
- SimpleRocketFire::SimpleRocketFire(BaseObject* creator) : WeaponMode(creator)
- {
- RegisterObject(SimpleRocketFire);
-
- this->reloadTime_ = 1;
- this->bParallelReload_ = false;
- this->damage_ = 100;
- this->speed_ = 500;
-
- this->setMunitionName("TargetSeeking Rockets");
- this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4);
- // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
- }
-
- SimpleRocketFire::~SimpleRocketFire()
- {
- }
-
- void SimpleRocketFire::fire()
- {
- RocketController* con = new RocketController(this);
- SimpleRocket* rocket = con->getRocket();
- this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
- rocket->setOrientation(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getWorldOrientation());
- rocket->setPosition(this->getMuzzlePosition());
- rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
- rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
- rocket->setDamage(this->damage_);
- WorldEntity* pawnn=static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget();
- if (pawnn) con->setTarget(pawnn);
- }
-}
+/*
+ * 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:
+ * Oliver Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "SimpleRocketFire.h"
+
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "weapons/RocketController.h"
+
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/pawns/Pawn.h"
+#include "sound/WorldSound.h"
+
+namespace orxonox
+{
+
+ CreateFactory(SimpleRocketFire);
+
+ SimpleRocketFire::SimpleRocketFire(BaseObject* creator) : WeaponMode(creator)
+ {
+ RegisterObject(SimpleRocketFire);
+
+ this->reloadTime_ = 1;
+ this->bParallelReload_ = false;
+ this->damage_ = 100;
+ this->speed_ = 500;
+
+ this->setMunitionName("TargetSeeking Rockets");
+ this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4);
+ // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+ }
+
+ SimpleRocketFire::~SimpleRocketFire()
+ {
+ }
+
+ void SimpleRocketFire::fire()
+ {
+ RocketController* con = new RocketController(this);
+ SimpleRocket* rocket = con->getRocket();
+ this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+ rocket->setOrientation(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getWorldOrientation());
+ rocket->setPosition(this->getMuzzlePosition());
+ rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
+ rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+ rocket->setDamage(this->damage_);
+ WorldEntity* pawnn=static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget();
+ if (pawnn) con->setTarget(pawnn);
+ }
+}
Property changes on: code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.h
===================================================================
--- code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.h 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.h 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,57 +1,57 @@
-/*
- * 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:
- * Oliver Scheuss
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _SimpleRocketFire_H__
-#define _SimpleRocketFire_H__
-
-#include "weapons/WeaponsPrereqs.h"
-#include "weaponsystem/WeaponMode.h"
-
-namespace orxonox
-{
- /**
- @brief
- FireMode for target-seeking Rocket
- @author
- Gabriel Nadler (Original file: Oli Scheuss)
- */
- class _WeaponsExport SimpleRocketFire : public WeaponMode
- {
- public:
- SimpleRocketFire(BaseObject* creator);
- virtual ~SimpleRocketFire();
- void deactivateFire();
- virtual void fire();
-
- private:
- float speed_;
-
- };
-}
-
-#endif /* _SimpleRocketFire_H__ */
+/*
+ * 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:
+ * Oliver Scheuss
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _SimpleRocketFire_H__
+#define _SimpleRocketFire_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+ /**
+ @brief
+ FireMode for target-seeking Rocket
+ @author
+ Gabriel Nadler (Original file: Oli Scheuss)
+ */
+ class _WeaponsExport SimpleRocketFire : public WeaponMode
+ {
+ public:
+ SimpleRocketFire(BaseObject* creator);
+ virtual ~SimpleRocketFire();
+ void deactivateFire();
+ virtual void fire();
+
+ private:
+ float speed_;
+
+ };
+}
+
+#endif /* _SimpleRocketFire_H__ */
Property changes on: code/branches/presentation3/src/modules/weapons/weaponmodes/SimpleRocketFire.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/orxonox/graphics/AnimatedModel.cc
===================================================================
--- code/branches/presentation3/src/orxonox/graphics/AnimatedModel.cc 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/orxonox/graphics/AnimatedModel.cc 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,126 +1,126 @@
-/*
- * 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:
- * Benjamin de Capitani
- *
- *
- */
-
-#include "AnimatedModel.h"
-
-#include <OgreEntity.h>
-#include <OgreAnimationState.h>
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "core/XMLPort.h"
-#include "Scene.h"
-
-namespace orxonox
-{
- CreateFactory(AnimatedModel);
-
- AnimatedModel::AnimatedModel(BaseObject* creator) : Model(creator)
- {
- RegisterObject(AnimatedModel);
- }
-
-
- AnimatedModel::~AnimatedModel()
- {
- if (this->isInitialized() && this->mesh_.getEntity())
- this->detachOgreObject(this->mesh_.getEntity());
- }
-
- void AnimatedModel::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(AnimatedModel, XMLPort, xmlelement, mode);
- XMLPortParam(AnimatedModel,"anims",setAnims,getAnims, xmlelement,mode).defaultValues("");
- XMLPortParam(AnimatedModel,"loop", setAnimLoop,getAnimLoop, xmlelement,mode).defaultValues(true);
- XMLPortParam(AnimatedModel,"enabled", setAnimEnabled,getAnimEnabled, xmlelement,mode).defaultValues(true);
- }
-
-
- void AnimatedModel::changedMesh()
- {
- if (GameMode::showsGraphics())
- {
- if (this->mesh_.getEntity())
- this->detachOgreObject(this->mesh_.getEntity());
-
- this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
-
- if (this->mesh_.getEntity())
- {
- this->attachOgreObject(this->mesh_.getEntity());
- this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
- this->setAnimationState(this->bAnimLoop_, this->bAnimEnabled_, this->anims_);
- this->mesh_.setVisible(this->isVisible());
- }
- }
- }
-
- void AnimatedModel::changedAnimationState()
- {
- this->setAnimationState(this->bAnimLoop_, this->bAnimEnabled_, this->anims_);
- }
- void AnimatedModel::setAnimationState(bool loop, bool enabled, const std::string& state)
- {
- if(state!="")
- {
- if(this->mesh_.getEntity()->getAnimationState(state))
- {
- Ogre::AnimationState* as = this->mesh_.getEntity()->getAnimationState(state);
- as->setLoop(loop);
- as->setEnabled(enabled);
- this->anims_ = state;
- }
- }
- }
-
- void AnimatedModel::setAnimLoop(bool loop)
- {
- this->bAnimLoop_ = loop;
- }
- void AnimatedModel::setAnimEnabled(bool enabled)
- {
- this->bAnimEnabled_ = enabled;
- }
- void AnimatedModel::tick(float dt)
- {
- if(this->mesh_.getEntity()->getAnimationState(anims_))
- {
-// Test to change Material at runtime!
-
-// Ogre::MaterialPtr mat = this->mesh_.getEntity()->getSubEntity(0)->getMaterial();
-// mat->setDiffuse(0.4, 0.3, 0.1, 0.1);
-// mat->setAmbient(0.3, 0.7, 0.8);
-// mat->setSpecular(0.5, 0.5, 0.5, 0.1);
-// Ogre::SceneBlendType sbt = Ogre::SBT_ADD;
-//
-// mat->setSceneBlending(sbt);
-
- Ogre::AnimationState* as = this->mesh_.getEntity()->getAnimationState(anims_);
- as->addTime(dt);
- }
-}
-}
+/*
+ * 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:
+ * Benjamin de Capitani
+ *
+ *
+ */
+
+#include "AnimatedModel.h"
+
+#include <OgreEntity.h>
+#include <OgreAnimationState.h>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "Scene.h"
+
+namespace orxonox
+{
+ CreateFactory(AnimatedModel);
+
+ AnimatedModel::AnimatedModel(BaseObject* creator) : Model(creator)
+ {
+ RegisterObject(AnimatedModel);
+ }
+
+
+ AnimatedModel::~AnimatedModel()
+ {
+ if (this->isInitialized() && this->mesh_.getEntity())
+ this->detachOgreObject(this->mesh_.getEntity());
+ }
+
+ void AnimatedModel::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(AnimatedModel, XMLPort, xmlelement, mode);
+ XMLPortParam(AnimatedModel,"anims",setAnims,getAnims, xmlelement,mode).defaultValues("");
+ XMLPortParam(AnimatedModel,"loop", setAnimLoop,getAnimLoop, xmlelement,mode).defaultValues(true);
+ XMLPortParam(AnimatedModel,"enabled", setAnimEnabled,getAnimEnabled, xmlelement,mode).defaultValues(true);
+ }
+
+
+ void AnimatedModel::changedMesh()
+ {
+ if (GameMode::showsGraphics())
+ {
+ if (this->mesh_.getEntity())
+ this->detachOgreObject(this->mesh_.getEntity());
+
+ this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
+
+ if (this->mesh_.getEntity())
+ {
+ this->attachOgreObject(this->mesh_.getEntity());
+ this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
+ this->setAnimationState(this->bAnimLoop_, this->bAnimEnabled_, this->anims_);
+ this->mesh_.setVisible(this->isVisible());
+ }
+ }
+ }
+
+ void AnimatedModel::changedAnimationState()
+ {
+ this->setAnimationState(this->bAnimLoop_, this->bAnimEnabled_, this->anims_);
+ }
+ void AnimatedModel::setAnimationState(bool loop, bool enabled, const std::string& state)
+ {
+ if(state!="")
+ {
+ if(this->mesh_.getEntity()->getAnimationState(state))
+ {
+ Ogre::AnimationState* as = this->mesh_.getEntity()->getAnimationState(state);
+ as->setLoop(loop);
+ as->setEnabled(enabled);
+ this->anims_ = state;
+ }
+ }
+ }
+
+ void AnimatedModel::setAnimLoop(bool loop)
+ {
+ this->bAnimLoop_ = loop;
+ }
+ void AnimatedModel::setAnimEnabled(bool enabled)
+ {
+ this->bAnimEnabled_ = enabled;
+ }
+ void AnimatedModel::tick(float dt)
+ {
+ if(this->mesh_.getEntity()->getAnimationState(anims_))
+ {
+// Test to change Material at runtime!
+
+// Ogre::MaterialPtr mat = this->mesh_.getEntity()->getSubEntity(0)->getMaterial();
+// mat->setDiffuse(0.4, 0.3, 0.1, 0.1);
+// mat->setAmbient(0.3, 0.7, 0.8);
+// mat->setSpecular(0.5, 0.5, 0.5, 0.1);
+// Ogre::SceneBlendType sbt = Ogre::SBT_ADD;
+//
+// mat->setSceneBlending(sbt);
+
+ Ogre::AnimationState* as = this->mesh_.getEntity()->getAnimationState(anims_);
+ as->addTime(dt);
+ }
+}
+}
Property changes on: code/branches/presentation3/src/orxonox/graphics/AnimatedModel.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentation3/src/orxonox/graphics/AnimatedModel.h
===================================================================
--- code/branches/presentation3/src/orxonox/graphics/AnimatedModel.h 2010-06-09 19:44:41 UTC (rev 7128)
+++ code/branches/presentation3/src/orxonox/graphics/AnimatedModel.h 2010-06-09 19:46:26 UTC (rev 7129)
@@ -1,76 +1,76 @@
-/*
- * 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:
- * ...
- *
- */
-
-#ifndef _AnimatedModel_H__
-#define _AnimatedModel_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <string>
-#include "tools/interfaces/Tickable.h"
-#include "Model.h"
-
-namespace orxonox
-{
- class _OrxonoxExport AnimatedModel : public Model, public Tickable
- {
- public:
- AnimatedModel(BaseObject* creator);
- virtual ~AnimatedModel();
-
- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- void registerVariables();
-
- virtual void changedAnimationState();
- virtual void setAnimationState(bool loop, bool enabled, const std::string& state);
- virtual void setAnimEnabled(bool enabled);
- virtual void setAnimLoop(bool loop);
- virtual void tick(float dt);
- virtual void changedMesh();
-
-
- inline void setAnims(const std::string& anims)
- { this->anims_ = anims; this->changedAnimationState(); }
- inline const std::string& getAnims() const
- { return this->anims_; }
-
- inline const std::string& getAnimationState() const
- { return this->anims_; }
- inline const bool& getAnimLoop() const
- { return this->bAnimLoop_; }
- inline const bool& getAnimEnabled() const
- { return this->bAnimEnabled_; }
-
- private:
- std::string anims_;
- bool bAnimEnabled_;
- bool bAnimLoop_;
- };
-}
-
-#endif /* _AnimatedModel_H__ */
+/*
+ * 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:
+ * ...
+ *
+ */
+
+#ifndef _AnimatedModel_H__
+#define _AnimatedModel_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "tools/interfaces/Tickable.h"
+#include "Model.h"
+
+namespace orxonox
+{
+ class _OrxonoxExport AnimatedModel : public Model, public Tickable
+ {
+ public:
+ AnimatedModel(BaseObject* creator);
+ virtual ~AnimatedModel();
+
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ void registerVariables();
+
+ virtual void changedAnimationState();
+ virtual void setAnimationState(bool loop, bool enabled, const std::string& state);
+ virtual void setAnimEnabled(bool enabled);
+ virtual void setAnimLoop(bool loop);
+ virtual void tick(float dt);
+ virtual void changedMesh();
+
+
+ inline void setAnims(const std::string& anims)
+ { this->anims_ = anims; this->changedAnimationState(); }
+ inline const std::string& getAnims() const
+ { return this->anims_; }
+
+ inline const std::string& getAnimationState() const
+ { return this->anims_; }
+ inline const bool& getAnimLoop() const
+ { return this->bAnimLoop_; }
+ inline const bool& getAnimEnabled() const
+ { return this->bAnimEnabled_; }
+
+ private:
+ std::string anims_;
+ bool bAnimEnabled_;
+ bool bAnimLoop_;
+ };
+}
+
+#endif /* _AnimatedModel_H__ */
Property changes on: code/branches/presentation3/src/orxonox/graphics/AnimatedModel.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/graphics/CEGuiSample.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/interfaces/Pickupable.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/sound/SoundStreamer.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentation3/src/orxonox/sound/SoundStreamer.h
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the Orxonox-commit
mailing list