[Orxonox-commit 2476] r7183 - in code/trunk/src: libraries/network/synchronisable modules/weapons/weaponmodes orxonox orxonox/controllers orxonox/graphics orxonox/weaponsystem orxonox/worldentities/pawns

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Aug 18 19:49:31 CEST 2010


Author: rgrieder
Date: 2010-08-18 19:49:31 +0200 (Wed, 18 Aug 2010)
New Revision: 7183

Modified:
   code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
   code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
   code/trunk/src/orxonox/ChatInputHandler.cc
   code/trunk/src/orxonox/controllers/ArtificialController.cc
   code/trunk/src/orxonox/graphics/MeshLodInformation.cc
   code/trunk/src/orxonox/graphics/Model.cc
   code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc
   code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc
Log:
Removed a load of warnings for VS 2005 and possibly VS 2008.

Modified: code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -92,10 +92,10 @@
       delete (*it);
     syncList_.clear();
     stringList_.clear();
-    std::map<uint32_t, Synchronisable*>::iterator it;
-    it = objectMap_.find(objectID_);
-    if (it != objectMap_.end())
-      objectMap_.erase(it);
+    std::map<uint32_t, Synchronisable*>::iterator it2;
+    it2 = objectMap_.find(objectID_);
+    if (it2 != objectMap_.end())
+      objectMap_.erase(it2);
 
   }
 

Modified: code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -53,7 +53,7 @@
         this->speed_ = 500;
 
             this->setMunitionName("TargetSeeking Rockets");
-            this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4);
+            this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4f);
         // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
     }
 

Modified: code/trunk/src/orxonox/ChatInputHandler.cc
===================================================================
--- code/trunk/src/orxonox/ChatInputHandler.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/orxonox/ChatInputHandler.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -128,7 +128,7 @@
     for( i = 0; i < NumberOfColors/3; ++i )
     { this->text_colors[ i ] = new CEGUI::colour( red, green, blue );
       assert( this->text_colors[ i ] );
-      green += 0.2, blue += 0.2;
+      green += 0.2f, blue += 0.2f;
     }
 
     // greens
@@ -136,7 +136,7 @@
     for( ; i < NumberOfColors*2/3; ++i )
     { this->text_colors[ i ] = new CEGUI::colour( red, green, blue );
       assert( this->text_colors[ i ] );
-      red += 0.2, blue += 0.2;
+      red += 0.2f, blue += 0.2f;
     }
 
     // blues
@@ -144,7 +144,7 @@
     for( ; i < NumberOfColors; ++i )
     { this->text_colors[ i ] = new CEGUI::colour( red, green, blue );
       assert( this->text_colors[ i ] );
-      red += 0.2, green += 0.2;
+      red += 0.2f, green += 0.2f;
     }
   }
 
@@ -274,14 +274,14 @@
     if( this->fullchat )
     {
       /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (this->input->getUnclippedInnerRect().getWidth()/6),
+      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6),
         cursorpos, assembled.length() );
       this->input->setProperty( "Text", assembled.substr( disp_offset ) );
     }
     else
     {
       /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (this->inputonly->getUnclippedInnerRect().getWidth()/6),
+      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6),
         cursorpos, assembled.length() );
       this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
     }

Modified: code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/orxonox/controllers/ArtificialController.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -497,14 +497,14 @@
             for(std::vector<ArtificialController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
             {
                 pos = Vector3::ZERO;
-                if (i <= 1) pos += dest  + FORMATION_WIDTH*(orient*WorldEntity::LEFT);
-                if (i == 2) pos += dest  + FORMATION_WIDTH*(orient*WorldEntity::RIGHT);
-                if (i == 3) pos += dest  + FORMATION_WIDTH*(orient*WorldEntity::UP);
+                if (i <= 1) pos += dest  + (float)FORMATION_WIDTH*(orient*WorldEntity::LEFT);
+                if (i == 2) pos += dest  + (float)FORMATION_WIDTH*(orient*WorldEntity::RIGHT);
+                if (i == 3) pos += dest  + (float)FORMATION_WIDTH*(orient*WorldEntity::UP);
                 if (i >= 4)
                 {
-                    pos += dest  + FORMATION_WIDTH*(orient*WorldEntity::DOWN);
+                    pos += dest  + (float)FORMATION_WIDTH*(orient*WorldEntity::DOWN);
                     i = 1;
-                    dest += FORMATION_LENGTH*(orient*WorldEntity::BACK);
+                    dest += (float)FORMATION_LENGTH*(orient*WorldEntity::BACK);
                     (*it)->setTargetPosition(pos);
                     continue;
                 }

Modified: code/trunk/src/orxonox/graphics/MeshLodInformation.cc
===================================================================
--- code/trunk/src/orxonox/graphics/MeshLodInformation.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/orxonox/graphics/MeshLodInformation.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -40,7 +40,7 @@
     CreateFactory(MeshLodInformation);
 
     MeshLodInformation::MeshLodInformation(BaseObject* creator)
-    : BaseObject(creator), lodLevel_(5), bEnabled_(true), numLevels_(10), reductionRate_(0.15)
+    : BaseObject(creator), lodLevel_(5), bEnabled_(true), numLevels_(10), reductionRate_(0.15f)
     {
         RegisterObject(MeshLodInformation);
     }

Modified: code/trunk/src/orxonox/graphics/Model.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Model.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/orxonox/graphics/Model.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -43,7 +43,7 @@
     CreateFactory(Model);
 
     Model::Model(BaseObject* creator) :
-        StaticEntity(creator), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15)
+        StaticEntity(creator), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15f)
     {
         RegisterObject(Model);
 

Modified: code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -221,9 +221,9 @@
             it->second->removeWeaponmodeLink(wPack);
 
         // Remove the WeaponPack from the WeaponSystem
-        std::vector<WeaponPack*>::iterator it = std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(), wPack);
-        assert(it !=this->weaponPacks_.end());
-        this->weaponPacks_.erase(it);
+        std::vector<WeaponPack*>::iterator it2 = std::find(this->weaponPacks_.begin(),this->weaponPacks_.end(), wPack);
+        assert(it2 !=this->weaponPacks_.end());
+        this->weaponPacks_.erase(it2);
     }
 
     WeaponPack * WeaponSystem::getWeaponPack(unsigned int index) const

Modified: code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc	2010-08-18 17:41:10 UTC (rev 7182)
+++ code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc	2010-08-18 17:49:31 UTC (rev 7183)
@@ -170,23 +170,23 @@
                 this->yaw(Radian(this->yaw_ * this->getMouseLookSpeed()), WorldEntity::Parent);
 
                 Radian pitch = this->cameraPositionRootNode_->getOrientation().getPitch();
-                if (pitch < Radian(1.5707) && pitch > Radian(-1.5707))
+                if (pitch < Radian(1.5707f) && pitch > Radian(-1.5707f))
                 {
                     this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
                 }
-                else if (pitch < Radian(-1.5707))
+                else if (pitch < Radian(-1.5707f))
                 {
-                    if (this->pitch_ > 0.0)
+                    if (this->pitch_ > 0.0f)
                         this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
-                    else if (pitch < Radian(-1.571))
-                        this->cameraPositionRootNode_->pitch(-pitch + Radian(-1.570796));
+                    else if (pitch < Radian(-1.571f))
+                        this->cameraPositionRootNode_->pitch(-pitch + Radian(-1.570796f));
                 }
-                else if (pitch > Radian(1.5707))
+                else if (pitch > Radian(1.5707f))
                 {
-                    if (this->pitch_ < 0.0)
+                    if (this->pitch_ < 0.0f)
                         this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
-                    else if (pitch > Radian(1.571))
-                        this->cameraPositionRootNode_->pitch(-pitch + Radian(1.570796));
+                    else if (pitch > Radian(1.571f))
+                        this->cameraPositionRootNode_->pitch(-pitch + Radian(1.570796f));
                 }
                 this->weaponNode_->setOrientation(this->cameraPositionRootNode_->getOrientation());
             }




More information about the Orxonox-commit mailing list