[Orxonox-commit 6565] r11205 - in code/branches/sagerjFS16: data/levels data/levels/includes data/levels/templates src/modules/overlays/hud src/modules/weapons/weaponmodes

sagerj at orxonox.net sagerj at orxonox.net
Thu May 26 15:58:37 CEST 2016


Author: sagerj
Date: 2016-05-26 15:58:37 +0200 (Thu, 26 May 2016)
New Revision: 11205

Added:
   code/branches/sagerjFS16/data/levels/florin_johnny_presentation.oxw
   code/branches/sagerjFS16/data/levels/includes/weaponSettingsFx112.oxi
   code/branches/sagerjFS16/data/levels/templates/spaceshipFx112.oxt
Modified:
   code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscortDischarger.oxi
   code/branches/sagerjFS16/src/modules/overlays/hud/HUDChargeBar.cc
   code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
   code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h
Log:
zusammengemerged mit florin project

Added: code/branches/sagerjFS16/data/levels/florin_johnny_presentation.oxw
===================================================================
--- code/branches/sagerjFS16/data/levels/florin_johnny_presentation.oxw	                        (rev 0)
+++ code/branches/sagerjFS16/data/levels/florin_johnny_presentation.oxw	2016-05-26 13:58:37 UTC (rev 11205)
@@ -0,0 +1,53 @@
+<LevelInfo
+ name = "Empty level"
+ description = "A level with absolutely nothing in it."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipEscort.oxt")
+  include("templates/spaceshipFx112.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipfx112 />
+<Model position=“0,0,0“ mesh="fx112.mesh" scale="3" />
+
+<SpaceShip position="300,0,0" lookat="0,0,0" team=3>
+    <templates>
+        <Template link=spaceshipfx112 />
+    </templates>
+    <controller>
+        <WaypointController accuracy=10 team=3>
+            <waypoints>
+                <Model mesh="cube.mesh" scale=8 position="300,0,0" />
+                <Model mesh="cube.mesh" scale=8 position="300,500,0" />
+                <Model mesh="cube.mesh" scale=8 position="0,500,0" />
+                <StaticEntity position="0,0,0" />
+            </waypoints>
+        </WaypointController>
+    </controller>
+</SpaceShip>
+
+    
+  </Scene>
+</Level>
+

Modified: code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscortDischarger.oxi
===================================================================
--- code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscortDischarger.oxi	2016-05-26 13:54:24 UTC (rev 11204)
+++ code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscortDischarger.oxi	2016-05-26 13:58:37 UTC (rev 11205)
@@ -1,6 +1,6 @@
     <weaponslots>
-      <WeaponSlot position="-9.2,2,-13" />
-      <WeaponSlot position=" 9.2,2,-13" />
+      <WeaponSlot position="-10,0,0" />
+      <WeaponSlot position=" 10,0,0" />
     </weaponslots>
     <weaponsets>
       <WeaponSet firemode=0 />
@@ -24,7 +24,7 @@
         </Weapon>
         <Weapon>
           <Discharger
-            mode=0
+            mode=1
             munitionpershot=1
             delay=0
             damage=0.8

Added: code/branches/sagerjFS16/data/levels/includes/weaponSettingsFx112.oxi
===================================================================
--- code/branches/sagerjFS16/data/levels/includes/weaponSettingsFx112.oxi	                        (rev 0)
+++ code/branches/sagerjFS16/data/levels/includes/weaponSettingsFx112.oxi	2016-05-26 13:58:37 UTC (rev 11205)
@@ -0,0 +1,44 @@
+    <weaponslots>
+      <WeaponSlot position="-6.6, -2,-12" />
+      <WeaponSlot position=" 6.6, -2,-12" />
+      <WeaponSlot position=" -4.6, -2,-19" />
+      <WeaponSlot position=" 4.6, -2,-19" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+    </weaponsets>
+    <weaponpacks>
+
+      <WeaponPack>
+
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+        </links>
+
+        <Weapon>
+          <Discharger mode=0 munitionpershot=1 delay=0 damage=0.8 material="Flares/point_lensflare" projectileMesh="LaserBeam2.mesh" />
+        </Weapon>
+
+        <Weapon>
+          <Discharger mode=0 munitionpershot=1 delay=0.1 damage=0.8 material="Flares/point_lensflare" projectileMesh="LaserBeam2.mesh" />
+        </Weapon>
+
+	      <Weapon>
+          <HsW01 mode=1 munitionpershot=1 delay=0.0 healthdamage=10 material="Flares/point_lensflare" muzzleoffset=" 1.6,1.3,-2.0" />
+          <HsW01 mode=1 munitionpershot=1 delay=0.2 healthdamage=5 material="Flares/point_lensflare" muzzleoffset="-0.1,1.6,-2.0" />
+        </Weapon>
+
+        <Weapon>
+	        <HsW01 mode=1 munitionpershot=1 delay=0.1 healthdamage=10 material="Flares/point_lensflare" muzzleoffset=" 1.6,1.3,-2.0" />
+          <HsW01 mode=1 munitionpershot=1 delay=0.3 healthdamage=5 material="Flares/point_lensflare" muzzleoffset="-0.1,1.6,-2.0" />
+	      </Weapon>
+
+      </WeaponPack>
+
+    </weaponpacks>
+
+    <munition>
+      <LaserMunition initialmagazines=6 maxmagazines=12 munitionpermagazine=5 replenishamount=6 replenishinterval=30 />
+    </munition>

Added: code/branches/sagerjFS16/data/levels/templates/spaceshipFx112.oxt
===================================================================
--- code/branches/sagerjFS16/data/levels/templates/spaceshipFx112.oxt	                        (rev 0)
+++ code/branches/sagerjFS16/data/levels/templates/spaceshipFx112.oxt	2016-05-26 13:58:37 UTC (rev 11205)
@@ -0,0 +1,125 @@
+<Template name=spaceshipfx112>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipfx112cameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 10
+
+   health            = 150
+   maxhealth         = 300
+   initialhealth     = 120
+
+   shieldhealth        = 70
+   initialshieldhealth = 70
+   maxshieldhealth     = 130
+   shieldabsorption    = 1.2
+   shieldrechargerate  = 2
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 100
+   auxilaryThrust    = 20
+   rotationThrust    = 40
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 20
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 6
+
+   collisionType     = "dynamic"
+   mass              = 90
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipfx112engine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipfx112engine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=180 pitch=0 roll=0 scale=4 mesh="fx112.mesh" />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0, 1.6, 5.6" halfExtents="8,13.6,3.2" pitch=90 />
+      <BoxCollisionShape position="0, -1, 2" halfExtents="18, -9.2,-1.6" pitch=90/>
+      <BoxCollisionShape position="0, 0, -17.2" halfExtents="4, 9.2,2.4" pitch=90/>
+    </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="explosionparts/fx112_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_3.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_4.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_5.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_6.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_7.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_8.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/fx112_part_9.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+<?lua
+  include("../includes/weaponSettingsFx112.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipfx112cameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,15, 60" drag=true mouselook=true />
+      <CameraPosition position="0,20, 90" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipfx112engine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2.8
+
+   speedfront     = 250
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 500
+   accelerationbrake     = 500
+   accelerationback      =  100
+   accelerationleftright =  100
+   accelerationupdown    =  100
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+       />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 10.8, -0.7, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-10.8, -0.7, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="10.5, -0.7, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="-10.5, -0.7, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="10.5, -0.7, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-10.5, -0.7, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="10.5, -0.7, 14" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-10.5, -0.7, 14" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>

Modified: code/branches/sagerjFS16/src/modules/overlays/hud/HUDChargeBar.cc
===================================================================
--- code/branches/sagerjFS16/src/modules/overlays/hud/HUDChargeBar.cc	2016-05-26 13:54:24 UTC (rev 11204)
+++ code/branches/sagerjFS16/src/modules/overlays/hud/HUDChargeBar.cc	2016-05-26 13:58:37 UTC (rev 11205)
@@ -59,6 +59,7 @@
                 this->setValue( correspondingMode_->getCharges() * 1.0f / correspondingMode_->getMaxCharges() );    // The Value of the HUDBar is the ratio of current Charges and the maximum Charges possible
                 
                 if(this->correspondingMode_->getCharges() > 0)                                                      // The HUDBar should only be visible when we are charging up
+                {
                     this->setVisible(true);
                 }
                 else

Modified: code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
===================================================================
--- code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc	2016-05-26 13:54:24 UTC (rev 11204)
+++ code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc	2016-05-26 13:58:37 UTC (rev 11205)
@@ -66,6 +66,24 @@
     {
         BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
 
+        if(this->charges_ < this->thresholdOne_)
+        {
+            projectile->setMaterial("Flares/lensflare");
+        }
+        else
+        {
+            if(this->charges_ < this->thresholdTwo_)
+            {
+                projectile->setMaterial("Flares/ringflare");
+            }
+            else
+            {
+                projectile->setMaterial("Flares/ringflare2");  
+            }
+        }
+
+        projectile->setScale(1+this->charges_/10);
+
         this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
         projectile->setOrientation(this->getMuzzleOrientation());
         projectile->setPosition(this->getMuzzlePosition());

Modified: code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h
===================================================================
--- code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h	2016-05-26 13:54:24 UTC (rev 11204)
+++ code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h	2016-05-26 13:58:37 UTC (rev 11205)
@@ -52,13 +52,14 @@
     {
         public:
             Discharger(Context* context);
-            virtual ~Discharger() {}
+            virtual ~Discharger() {}                    // declaration for the constructor
 
-            virtual void fire() override;
+            virtual void fire() override;               // declaration of specific fire function of each weapon
 
         private:
-            float speed_;                  // The speed of the fired projectile.
-            
+            float speed_;                               // The speed of the fired projectile.
+            const unsigned int thresholdOne_ = 50;      // Threshold amount of charges where the projectile changes the first time
+            const unsigned int thresholdTwo_ = 100;     // Threshold amount of charges where the projectile changes the second time        
     }; 
 }
 




More information about the Orxonox-commit mailing list