[Orxonox-commit 3548] r8234 - in code/trunk/src: modules/designtools orxonox/gametypes

rgrieder at orxonox.net rgrieder at orxonox.net
Tue Apr 12 17:10:26 CEST 2011


Author: rgrieder
Date: 2011-04-12 17:10:26 +0200 (Tue, 12 Apr 2011)
New Revision: 8234

Modified:
   code/trunk/src/modules/designtools/SkyboxGenerator.cc
   code/trunk/src/orxonox/gametypes/LastManStanding.cc
   code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
Log:
Removed 6 MSVC warnings about conversions.

Modified: code/trunk/src/modules/designtools/SkyboxGenerator.cc
===================================================================
--- code/trunk/src/modules/designtools/SkyboxGenerator.cc	2011-04-12 13:18:55 UTC (rev 8233)
+++ code/trunk/src/modules/designtools/SkyboxGenerator.cc	2011-04-12 15:10:26 UTC (rev 8234)
@@ -188,9 +188,9 @@
                 // Rotate the camera to be ready for taking the next picture.
                 std::pair<int, int> rotate = this->rotations_[this->faceCounter_];
                 if(rotate.first != 0)
-                    entity->yaw(Degree(rotate.first));
+                    entity->yaw(Degree((float)rotate.first));
                 if(rotate.second != 0)
-                    entity->pitch(Degree(rotate.second));
+                    entity->pitch(Degree((float)rotate.second));
                 
                 COUT(4) << "Created face number " << this->faceCounter_ << "." << endl;
                 // Check whether we've generated all 6 faces.

Modified: code/trunk/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastManStanding.cc	2011-04-12 13:18:55 UTC (rev 8233)
+++ code/trunk/src/orxonox/gametypes/LastManStanding.cc	2011-04-12 15:10:26 UTC (rev 8234)
@@ -221,7 +221,7 @@
             }
             else
             {
-                float damage=pawn->getMaxHealth()*punishDamageRate*0.5;//TODO: Factor 0.5 is hard coded. Where is the ratio between MaxHealth actually defined?
+                float damage=pawn->getMaxHealth()*punishDamageRate*0.5f;//TODO: Factor 0.5 is hard coded. Where is the ratio between MaxHealth actually defined?
                 pawn->removeHealth(damage);
                 this->timeToAct_[player]=timeRemaining;//reset timer
             }
@@ -250,7 +250,7 @@
 
                     if (it->first->getClientID()== CLIENTID_UNKNOWN)
                         continue;
-                    int output=1+playerDelayTime_[it->first];
+                    int output=1+(int)playerDelayTime_[it->first];
                     const std::string& message = "Respawn in " +multi_cast<std::string>(output)+ " seconds." ;//Countdown
                     this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
                 }

Modified: code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	2011-04-12 13:18:55 UTC (rev 8233)
+++ code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	2011-04-12 15:10:26 UTC (rev 8234)
@@ -197,7 +197,7 @@
 
                     if (it->first->getClientID()== CLIENTID_UNKNOWN)
                         continue;
-                    int output = 1 + playerDelayTime_[it->first];
+                    int output = 1 + (int)playerDelayTime_[it->first];
                     const std::string& message = "Respawn in " +multi_cast<std::string>(output)+ " seconds." ;//Countdown
                     this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
                 }
@@ -293,7 +293,7 @@
             }
             else
             {
-                float damage = pawn->getMaxHealth()*punishDamageRate*0.5;//TODO: Factor 0.5 is hard coded. Where is the ratio between MaxHealth actually defined?
+                float damage = pawn->getMaxHealth()*punishDamageRate*0.5f;//TODO: Factor 0.5 is hard coded. Where is the ratio between MaxHealth actually defined?
                 pawn->removeHealth(damage);
                 this->timeToAct_[player] = timeRemaining;//reset timer
             }




More information about the Orxonox-commit mailing list