[Orxonox-commit 6551] r11192 - in code/branches/tgidronFS16: data/levels data/levels/includes data/levels/templates data/overlays src/modules/hover src/modules/invader src/modules/weapons/weaponmodes

tgidron at orxonox.net tgidron at orxonox.net
Thu May 19 17:50:36 CEST 2016


Author: tgidron
Date: 2016-05-19 17:50:36 +0200 (Thu, 19 May 2016)
New Revision: 11192

Modified:
   code/branches/tgidronFS16/data/levels/Hover.oxw
   code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi
   code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt
   code/branches/tgidronFS16/data/overlays/HoverHUD.oxo
   code/branches/tgidronFS16/src/modules/hover/Hover.cc
   code/branches/tgidronFS16/src/modules/hover/Hover.h
   code/branches/tgidronFS16/src/modules/hover/HoverOrigin.cc
   code/branches/tgidronFS16/src/modules/hover/HoverOrigin.h
   code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.cc
   code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.h
   code/branches/tgidronFS16/src/modules/invader/Invader.cc
   code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.cc
   code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.h
Log:
New Floor, Level HUD, Pickups work

Modified: code/branches/tgidronFS16/data/levels/Hover.oxw
===================================================================
--- code/branches/tgidronFS16/data/levels/Hover.oxw	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/data/levels/Hover.oxw	2016-05-19 15:50:36 UTC (rev 11192)
@@ -24,33 +24,7 @@
 MAZE_WALL_THICKNESS = 10
 MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE
 ?>
-<!--
-<Template name=mediumdamagehoverpickupRepresentation>
-    <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.70,0.10,0.10" material="Damage" scale=0.5 />
-                        </attached>
-                    </Billboard>
-                </attached>
-            </StaticEntity>
-        </spawner-representation>
-    </PickupRepresentation>
-</Template>
 
-<Template name=damagehover baseclass=DamageBoostPickup>
-  <DamageBoostPickup
-    representation = "mediumdamagehoverpickup"
-    duration = 10.0
-    damageMultiplier = 5.0
-    activationType = "immediate"
-    durationType = "continuous"
-  />
-</Template> -->
-
 <!-- Shrink Pickup Representation -->
 
 <Template name=smallshrinkpickupRepresentation>
@@ -58,7 +32,7 @@
         <spawner-representation>
             <StaticEntity>
                 <attached>
-                    <Billboard position="0,50,0" colour="1.0,0.55,1.0" material="Sphere2" scale=1>
+                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.5>
                         <attached>
                             <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.35 />
                         </attached>
@@ -74,7 +48,7 @@
   <ShrinkPickup 
     representation = "smallshrinkpickup"
     duration = 10.0
-    shrinkFactor = 2.5
+    shrinkFactor = 2
     activaionType = "immediate"
     durationType = "continuous"
   />
@@ -87,7 +61,7 @@
         <spawner-representation>
             <StaticEntity>
                 <attached>
-                    <Billboard position="0,50,0" colour="0.99,0.96,0.52" material="Sphere2" scale=1>
+                    <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.5>
                         <attached>
                             <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.7 />
                         </attached>
@@ -103,7 +77,7 @@
     representation = "hugespeedpickup"
     duration = 10.0
     speedAdd = 0.0
-    SpeedMultiply = 50.0
+    SpeedMultiply = 5.0
     activationType = "immediate"
     durationType = "continuous"
   />
@@ -116,7 +90,7 @@
         <spawner-representation>
             <StaticEntity>
                 <attached>
-                    <Billboard position="0,50,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=1>
+                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.5>
                         <attached>
                             <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Asterisk" scale=0.65 />
                         </attached>
@@ -134,9 +108,9 @@
 <!-- Obstacle (crate) Template -->
 
 <Template name=obstacle baseclass=Pawn>
-    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
+    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=10000000000000 name=box RVName = "Box 4" >
         <attached>
-            <Model position="0,50,0" mesh="crate.mesh" scale3D="15,15,15" />
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="15,15,15" />
         </attached>
         <collisionShapes>
             <BoxCollisionShape position="0,0,0" halfExtents="70,70,70" />
@@ -144,7 +118,19 @@
     </Pawn>
 </Template>
 
+<!-- Ground Template -->
 
+<Template name=ground baseclass=StaticEntity>
+    <StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=100000000 friction=0.01 >
+      <attached> 
+        <Model position="0,0,0" mesh="CubeGround.mesh" scale3D="300,20,300" /> 
+      </attached> 
+      <collisionShapes> 
+        <BoxCollisionShape position="0,0,0" halfExtents="300,10,300" /> 
+      </collisionShapes> 
+    </StaticEntity>
+</Template>
+
 <Level
 plugins = hover
 gametype = Hover
@@ -155,38 +141,6 @@
 
   <?lua include("includes/notifications.oxi") ?>
 
-
-  <?lua
-      for i = 1, 10, 1 do
-          for j = 1,10 ,1 do
-  ?>
-
-  <StaticEntity position="0,0,0" collisionType="static">
-    <attached>
-      <Model
-        position="<?lua print(MAZE_CELL_SIZE*i)?>, -16, <?lua print(MAZE_CELL_SIZE*j)?>" 
-        scale3D="<?lua print(MAZE_CELL_SIZE*i)?>, 16, <?lua print(MAZE_CELL_SIZE*j)?>"
-        mesh="CubeGround.mesh"
-        />
-    </attached> 
-      <collisionShapes>
-        <BoxCollisionShape
-          position="<?lua print(MAZE_CELL_SIZE*i)?>, <?lua print(MAZE_CELL_HEIGHT+1)?>, <?lua print(MAZE_CELL_SIZE*j)?>"
-          halfExtents="<?lua print(MAZE_CELL_SIZE*i)?>,1,<?lua print(MAZE_CELL_SIZE*j)?>"
-        />
-        <BoxCollisionShape
-          position="<?lua print(MAZE_CELL_SIZE*i)?>,-1,<?lua print(MAZE_CELL_SIZE*j)?>"
-          halfExtents="<?lua print(MAZE_CELL_SIZE*i)?>,1,<?lua print(MAZE_CELL_SIZE*j)?>"
-        />
-      </collisionShapes>
-
-  <?lua
-      end
-    end
-   ?>
-
-  </StaticEntity>
-
   <Scene
     ambientlight = "0.8, 0.8, 0.8"
     skybox       = "Orxonox/Starbox"
@@ -216,14 +170,6 @@
       spawnerTemplate = "smallshrinkpickupRepresentation"
       inventoryRepresentation = "SmallShrink"
     />
-<!--
-    <PickupRepresentation
-      name = "damagehover"
-      pickupName = "Medium Damage Hover Pickup"
-      pickupDescription = "Multiplies the ship damage with 5."
-      spawnerTemplate = "mediumdamagehoverpickupRepresentation"
-      inventoryRepresentation = "MediumDamageHover"
-    /> -->
 
     <StaticEntity position="0,0,0" collisionType="static">
       <attached>
@@ -238,9 +184,11 @@
           pickuprepresentationtemplatespeed=hugespeedpickupRepresentation
           pickuptemplateshrink=smallshrinkpickup
           pickuprepresentationtemplateshrink=smallshrinkpickupRepresentation
+          groundtemplate=ground
         />
-        </attached> 
-       
+
+      </attached> 
+     
     </StaticEntity>
 
     <Light
@@ -261,23 +209,3 @@
     
   </Scene>
 </Level>
-
-
-
-<!--<<Model
-          position="<?lua print(MAZE_SIZE/2)?>,-16,<?lua print(MAZE_SIZE/2)?>"
-          scale3D="<?lua print(MAZE_SIZE/2)?>,16,<?lua print(MAZE_SIZE/2)?>"
-          mesh="ss_wall.mesh"
-        /> 
-      </attached> 
-      
-      <collisionShapes>
-        <BoxCollisionShape
-          position="<?lua print(MAZE_SIZE/2)?>,<?lua print(MAZE_CELL_HEIGHT+1)?>,<?lua print(MAZE_SIZE/2)?>"
-          halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
-        />
-        <BoxCollisionShape
-          position="<?lua print(MAZE_SIZE/2)?>,-1,<?lua print(MAZE_SIZE/2)?>"
-          halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
-        />
-      </collisionShapes> -->
\ No newline at end of file

Modified: code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi
===================================================================
--- code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi	2016-05-19 15:50:36 UTC (rev 11192)
@@ -13,10 +13,10 @@
       <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
     </links>
     <Weapon>
-      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1, 1,-18 " projectileMesh="LaserBeam2.mesh" />
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 speed=2000.0f damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1, 1,-50 " projectileMesh="LaserBeam2.mesh" />
     </Weapon>
     <Weapon>
-      <EnergyDrink mode=0 munitionpershot=0 delay=0 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.8, 1, -18.0" projectileMesh="LaserBeam2.mesh" />
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 speed=2000.0f damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.8, 1,-50" projectileMesh="LaserBeam2.mesh" />
     </Weapon>
   </WeaponPack>
   <WeaponPack>
@@ -26,6 +26,5 @@
   </WeaponPack>
 </weaponpacks>  
 <munition>
-  <LaserMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
-  <FusionMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+  <LaserMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=20/>
 </munition>

Modified: code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt
===================================================================
--- code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt	2016-05-19 15:50:36 UTC (rev 11192)
@@ -21,7 +21,7 @@
    auxilaryThrust    = 1
    rotationThrust    = 45
 
-   jumpBoost = 230
+   jumpBoost = 450
 
    lift = 1;
    stallSpeed = 1400;
@@ -32,7 +32,7 @@
    boostCooldownDuration = 10
 
    collisionType     = "dynamic"
-   mass              = 100000
+   mass              = 1000000
    linearDamping     = 0.2
    angularDamping    = 0.9999999
   >
@@ -46,11 +46,11 @@
       
     </attached>
     <collisionShapes>
-      <BoxCollisionShape position="0,-12, 42" halfExtents="42, 24 ,180" />
+      <BoxCollisionShape position="0,-12, 42" halfExtents="49, 24 ,180" />
     </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" scale=2 />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" scale=12 />
       <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
 
       <ExplosionPart mesh="explosionparts/pirate_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
@@ -80,13 +80,13 @@
 
    speedfront     = 1400
    speedback      =  800
-   speedleftright =  600
-   speedupdown    =  600
+   speedleftright =  700
+   speedupdown    =  700
 
    accelerationfront     = 1000
    accelerationbrake     = 1000
    accelerationback      =  250
-   accelerationleftright =  250
+   accelerationleftright =  350
    accelerationupdown    =  125
   >
     <EffectContainer condition="not idle">

Modified: code/branches/tgidronFS16/data/overlays/HoverHUD.oxo
===================================================================
--- code/branches/tgidronFS16/data/overlays/HoverHUD.oxo	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/data/overlays/HoverHUD.oxo	2016-05-19 15:50:36 UTC (rev 11192)
@@ -44,15 +44,6 @@
       <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
     </HUDHealthBar>
 
-    
-    <HUDNavigation
-     name          = "Navigation"
-     correctaspect = true
-     font          = "Monofur"
-     textsize      = 0.02
-     navMarkerSize = 0.03
-     aimMarkerSize = 0.02
-    />
 
 
     <OverlayText

Modified: code/branches/tgidronFS16/src/modules/hover/Hover.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/Hover.cc	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/hover/Hover.cc	2016-05-19 15:50:36 UTC (rev 11192)
@@ -63,6 +63,8 @@
         cellSize = 0;
         cellHeight = 0;
 
+        bShowLevel = false;
+
         totFlags = 0;
 
         this->setHUDTemplate("HoverHUD");
@@ -80,6 +82,19 @@
             cellSize = this->origin_->getCellSize();
             cellHeight = this->origin_->getCellHeight();
 
+            /*
+            bool occupiedCells[numCells][numCells];
+
+            for(int i = 0; i < numCells; i++)
+            {
+                for(int j = 0; j < numCells; j++)
+                {
+                    occupiedCells[i][j] = false;
+                }
+            }
+            occupiedCells[0][0] = true;
+            */
+
             MazeGenerator generator(numCells);
             generator.generateMaze();
             generator.renderMaze();
@@ -95,7 +110,19 @@
             }
 
 
+            //Ground
+            for(int i = 0; i<numCells; i++){
+                for(int j = 0; j<numCells; j++){
+                    StaticEntity* groundCell = new StaticEntity(origin_->getContext());
 
+                    groundCell->addTemplate(origin_->getGroundTemplate());
+                    groundCell->setPosition(get3dCoordinates(i,j,-60));
+                }
+
+            }
+
+
+
             //Generate inner Walls according to levelcode
             for(int y=0; y<numCells; y++){
                 for(int x=0; x<numCells; x++){
@@ -111,25 +138,18 @@
                 }
             }
 
-            //Generate 5 flags randomly (test only 1 flag)
-            for ( int i = 0; i < 5; i++ )
-            {
-                HoverFlag* flag = new HoverFlag(origin_->getContext());
-                flag->init(rand()%numCells, rand()%numCells, cellSize);
-                flags_.push_back(flag);
-            }
-            
+            createFlags();
 
             //Generate 3 PickupSpawners randomly (destroy hover pickup)
             for (int i = 0; i<3; i++)
             {
                 PickupSpawner* pickupSpawner = new PickupSpawner(origin_->getContext());
 
-                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f));
+                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 0.0f));
                 pickupSpawner->setPickupTemplateName(origin_->getPickupTemplate());
                 pickupSpawner->setMaxSpawnedItems(3);
                 pickupSpawner->setRespawnTime(30);
-                pickupSpawner->setTriggerDistance(5);
+                pickupSpawner->setTriggerDistance(40);
                 // Add pickup spawner to the pickup spawner list
                 pickupSpawners_.push_back(pickupSpawner);
             }
@@ -139,11 +159,11 @@
             {
                 PickupSpawner* pickupSpawner = new PickupSpawner(origin_->getContext());
 
-                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f));
+                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 0.0f));
                 pickupSpawner->setPickupTemplateName(origin_->getPickupTemplateSpeed());
                 pickupSpawner->setMaxSpawnedItems(3);
                 pickupSpawner->setRespawnTime(30);
-                pickupSpawner->setTriggerDistance(5);
+                pickupSpawner->setTriggerDistance(40);
                 // Add pickup spawner to the pickup spawner list
                 pickupSpawners_.push_back(pickupSpawner);
             }
@@ -153,26 +173,29 @@
             {
                 PickupSpawner* pickupSpawner = new PickupSpawner(origin_->getContext());
 
-                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f));
+                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 0.0f));
                 pickupSpawner->setPickupTemplateName(origin_->getPickupTemplateShrink());
                 pickupSpawner->setMaxSpawnedItems(3);
                 pickupSpawner->setRespawnTime(30);
-                pickupSpawner->setTriggerDistance(5);
+                pickupSpawner->setTriggerDistance(40);
                 // Add pickup spawner to the pickup spawner list
                 pickupSpawners_.push_back(pickupSpawner);
             }
 
             //*****************************************************************************
 
-            //Generate a destroyable crate randomly on field
+            //Generate destroyable crates randomly on field
 
-            Pawn* crate = new Pawn(origin_->getContext());
+            for (int i = 0; i<10; i++){
 
+                Pawn* crate = new Pawn(origin_->getContext());
+
+                crate->addTemplate(origin_->getObstacleTemplate());  
+                crate->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 43.0f));
+
+
+            }    
             
-            crate->addTemplate(origin_->getObstacleTemplate());  
-            crate->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f));
-            //ate->setInitialHealth(100.0f);
-            
 
 
 
@@ -185,24 +208,51 @@
             orxout() << this->origin_->getPickupTemplate() << endl;
             orxout() << this->origin_->getPickupRepresentationTemplate() << endl;
 
+
             orxout() << this->origin_->getPickupTemplateSpeed() << endl;
             orxout() << this->origin_->getPickupRepresentationTemplateSpeed() << endl;
 
             orxout() << this->origin_->getObstacleTemplate() << endl;
-            orxout() << crate->getPosition() << endl;
+            //orxout() << crate->getPosition() << endl;
         }
     }
 
 
     // Start new level
-    void Hover::newLevel()
+    void Hover::createFlags()
     {
         //Generate 5 flags randomly (test only 1 flag)
+
+          /*  do
+            {
+                int i = 0;
+
+                HoverFlag* flag = new HoverFlag(origin_->getContext());
+                int x = rand()%numCells;
+                int y = rand()%numCells;
+                flag->init(x, y, cellSize);
+                flags_.push_back(flag);
+
+                occupiedCells[x][y] = true;
+
+                i++;
+
+            }while( i<5 || occupiedCells[x][y] == true);
+            */
+
             for ( int i = 0; i < 5; i++ )
             {
                 HoverFlag* flag = new HoverFlag(origin_->getContext());
                 flag->init(rand()%numCells, rand()%numCells, cellSize);
                 flags_.push_back(flag);
+
+            
+
+                if(flags_[i]->getPosition() == get3dCoordinates(0,0,-60))
+                {
+                    flags_[i]->destroyLater();
+                    flags_.erase(flags_.begin()+i);
+                }
             }
             
     }
@@ -244,7 +294,9 @@
         {
             lives++;
         }
-        newLevel();
+        createFlags();
+        toggleShowLevel();
+        showLevelTimer.setTimer(1.0f, false, createExecutor(createFunctor(&Hover::toggleShowLevel, this)));
 
     }
 

Modified: code/branches/tgidronFS16/src/modules/hover/Hover.h
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/Hover.h	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/hover/Hover.h	2016-05-19 15:50:36 UTC (rev 11192)
@@ -57,7 +57,7 @@
                 { this->origin_ = origin; }
 
             void start();
-            void newLevel();
+            void createFlags();
             void levelUp();
             void endLevel();
             void costLife();
@@ -76,6 +76,8 @@
             inline int getLevel() const
                 { return this->level; }
 
+            bool bShowLevel;
+
         private:
 
             WeakPtr<HoverOrigin> origin_;
@@ -93,7 +95,10 @@
             int totFlags;
 
             std::vector<PickupSpawner*> pickupSpawners_;
-            
+
+            void toggleShowLevel(){bShowLevel = !bShowLevel;}
+
+            Timer showLevelTimer;
     };
 }
 

Modified: code/branches/tgidronFS16/src/modules/hover/HoverOrigin.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/HoverOrigin.cc	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/hover/HoverOrigin.cc	2016-05-19 15:50:36 UTC (rev 11192)
@@ -72,6 +72,7 @@
         XMLPortParam(HoverOrigin, "obstacletemplate", setObstacleTemplate, getObstacleTemplate, xmlelement, mode);
         XMLPortParam(HoverOrigin, "pickuptemplateshrink", setPickupTemplateShrink, getPickupTemplateShrink, xmlelement, mode);
         XMLPortParam(HoverOrigin, "pickuprepresentationtemplateshrink", setPickupRepresentationTemplateShrink, getPickupRepresentationTemplateShrink, xmlelement, mode);
+        XMLPortParam(HoverOrigin, "groundtemplate", setGroundTemplate, getGroundTemplate, xmlelement, mode);
     }
 
 

Modified: code/branches/tgidronFS16/src/modules/hover/HoverOrigin.h
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/HoverOrigin.h	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/hover/HoverOrigin.h	2016-05-19 15:50:36 UTC (rev 11192)
@@ -109,6 +109,13 @@
             inline std::string getObstacleTemplate() const
                 { return this->obstacleTemplate_; }        
 
+            //get and set for ground template
+
+            inline void setGroundTemplate(std::string groundTemplate)
+                { this->groundTemplate_ = groundTemplate; }
+            inline std::string getGroundTemplate() const
+                { return this->groundTemplate_; }  
+
         private:
             void checkGametype();
 
@@ -131,6 +138,9 @@
 
             //Template for crate obstacle
             std::string obstacleTemplate_;
+
+            //Template for ground cell
+            std::string groundTemplate_;
     };
 }
 

Modified: code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.cc	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.cc	2016-05-19 15:50:36 UTC (rev 11192)
@@ -84,8 +84,17 @@
                 setPosition(Vector2(0.18, 0.16));
                 this->setColour(ColourValue(1, 1, 1, 1));
                 this->setCaption(level);
+                
             }
             
+            if(this->hoverGame_->bShowLevel)
+                {
+                    setTextSize(0.2);
+                    setPosition(Vector2(0.3, 0.55));
+                    std::stringstream sstm;
+                    sstm << "Level " << level;
+                    this->setCaption(sstm.str());
+                }
     }
 
     void TFlagsLivesLevelHUD::changedOwner()

Modified: code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.h
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.h	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.h	2016-05-19 15:50:36 UTC (rev 11192)
@@ -84,6 +84,7 @@
             inline int getTotLevel() const
                 { return this->totLevel_; }
 
+
         private:
             Hover* hoverGame_;
             int totFlags_;

Modified: code/branches/tgidronFS16/src/modules/invader/Invader.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/invader/Invader.cc	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/invader/Invader.cc	2016-05-19 15:50:36 UTC (rev 11192)
@@ -70,7 +70,7 @@
         b_combo = false;
         // spawn enemy every 3.5 seconds
         enemySpawnTimer.setTimer(3.5f, true, createExecutor(createFunctor(&Invader::spawnEnemy, this)));
-        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&Invader::comboControll, this)));
+        comboTimer.setTimer(3.0f, false, createExecutor(createFunctor(&Invader::comboControll, this)));
         this->setHUDTemplate("InvaderHUD");
     }
 

Modified: code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.cc	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.cc	2016-05-19 15:50:36 UTC (rev 11192)
@@ -84,6 +84,7 @@
         XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode);
         XMLPortParam(HsW01, "projectileMesh", setMesh, getMesh, xmlelement, mode);
         XMLPortParam(HsW01, "sound", setSound, getSound, xmlelement, mode);
+        XMLPortParam(HsW01, "speed", setSpeed, getSpeed, xmlelement, mode);
     }
 
     /**

Modified: code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.h
===================================================================
--- code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.h	2016-05-19 15:37:05 UTC (rev 11191)
+++ code/branches/tgidronFS16/src/modules/weapons/weaponmodes/HsW01.h	2016-05-19 15:50:36 UTC (rev 11192)
@@ -111,6 +111,22 @@
             virtual void shot();
             void muzzleflash();
 
+            /**
+            @brief Set the firing speed.
+            @param speed The speed of the shot
+            */
+
+            void setSpeed(const float speed)
+                { this->speed_ = speed; }
+
+            /**
+            @brief Get the firing speed.
+            @return Returns the speed of the shot
+            */
+
+            const float getSpeed() const
+                { return this->speed_; }
+
             std::string material_; //!< The material.
             std::string mesh_; //!< The mesh.
             std::string sound_; //!< The sound.




More information about the Orxonox-commit mailing list