[Orxonox-commit 524] r3074 - in trunk/src: network orxonox/objects/pickup orxonox/objects/pickup/items orxonox/objects/weaponsystem

landauf at orxonox.net landauf at orxonox.net
Mon May 25 20:40:39 CEST 2009


Author: landauf
Date: 2009-05-25 20:40:39 +0200 (Mon, 25 May 2009)
New Revision: 3074

Modified:
   trunk/src/network/Host.cc
   trunk/src/orxonox/objects/pickup/PickupCollection.cc
   trunk/src/orxonox/objects/pickup/PickupInventory.cc
   trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc
   trunk/src/orxonox/objects/pickup/items/HealthImmediate.h
   trunk/src/orxonox/objects/pickup/items/Jump.cc
   trunk/src/orxonox/objects/pickup/items/Jump.h
   trunk/src/orxonox/objects/weaponsystem/Munition.cc
   trunk/src/orxonox/objects/weaponsystem/WeaponSystem.cc
Log:
removed some warnings and fixed an include error

Modified: trunk/src/network/Host.cc
===================================================================
--- trunk/src/network/Host.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/network/Host.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -107,6 +107,7 @@
   {
     for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
       it->incomingChat(message, 0);
+    return true;
   }
   else
     return instance_->broadcast(message);

Modified: trunk/src/orxonox/objects/pickup/PickupCollection.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupCollection.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/pickup/PickupCollection.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -89,7 +89,7 @@
     */
     bool PickupCollection::checkSlot(BaseItem* item)
     {
-        return (this->items_.count(item->getPickupIdentifier()) < item->getMaxCarryAmount());
+        return ((int)this->items_.count(item->getPickupIdentifier()) < item->getMaxCarryAmount());
     }
     /**
         @brief

Modified: trunk/src/orxonox/objects/pickup/PickupInventory.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/PickupInventory.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/pickup/PickupInventory.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -249,7 +249,7 @@
     void PickupInventory::updateEquipment(CEGUI::WindowManager* winMgr, CEGUI::Window* target)
     {
         Pawn* pawn;
-        if(pawn = HumanController::getLocalControllerEntityAsPawn())
+        if((pawn = HumanController::getLocalControllerEntityAsPawn()))
         {
             std::deque<EquipmentItem*> items = pawn->getPickups().getEquipmentItems();
             for(unsigned int i = 0; i < items.size(); i++)
@@ -273,7 +273,7 @@
     void PickupInventory::updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target)
     {
         Pawn* pawn;
-        if(pawn = HumanController::getLocalControllerEntityAsPawn())
+        if((pawn = HumanController::getLocalControllerEntityAsPawn()))
         {
             std::deque<UsableItem*> items = pawn->getPickups().getUsableItems();
             for(unsigned int i = 0; i < items.size(); i++)

Modified: trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -73,4 +73,4 @@
 
         return (curH < maxH);
     }
-}
\ No newline at end of file
+}

Modified: trunk/src/orxonox/objects/pickup/items/HealthImmediate.h
===================================================================
--- trunk/src/orxonox/objects/pickup/items/HealthImmediate.h	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/pickup/items/HealthImmediate.h	2009-05-25 18:40:39 UTC (rev 3074)
@@ -65,4 +65,4 @@
     };
 }
 
-#endif /* _HealthImmediate_H__ */
\ No newline at end of file
+#endif /* _HealthImmediate_H__ */

Modified: trunk/src/orxonox/objects/pickup/items/Jump.cc
===================================================================
--- trunk/src/orxonox/objects/pickup/items/Jump.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/pickup/items/Jump.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -32,7 +32,7 @@
 */
 
 #include "Jump.h"
-#include "DroppedItem.h"
+#include "objects/pickup/DroppedItem.h"
 
 #include "objects/worldentities/pawns/Pawn.h"
 

Modified: trunk/src/orxonox/objects/pickup/items/Jump.h
===================================================================
--- trunk/src/orxonox/objects/pickup/items/Jump.h	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/pickup/items/Jump.h	2009-05-25 18:40:39 UTC (rev 3074)
@@ -38,7 +38,7 @@
 
 #include "OrxonoxPrereqs.h"
 
-#include "UsableItem.h"
+#include "objects/pickup/UsableItem.h"
 #include "util/Math.h"
 
 namespace orxonox

Modified: trunk/src/orxonox/objects/weaponsystem/Munition.cc
===================================================================
--- trunk/src/orxonox/objects/weaponsystem/Munition.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/weaponsystem/Munition.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -355,7 +355,7 @@
         if (needed_magazines <= 0 && !this->bStackMunition_)
             return false;
 
-        if (amount <= needed_magazines)
+        if (amount <= (unsigned int)needed_magazines)
         {
             // We need more magazines than we get, so just add them
             this->magazines_ += amount;

Modified: trunk/src/orxonox/objects/weaponsystem/WeaponSystem.cc
===================================================================
--- trunk/src/orxonox/objects/weaponsystem/WeaponSystem.cc	2009-05-25 18:30:15 UTC (rev 3073)
+++ trunk/src/orxonox/objects/weaponsystem/WeaponSystem.cc	2009-05-25 18:40:39 UTC (rev 3074)
@@ -213,7 +213,7 @@
         // Remove all weapons from their WeaponSlot
         unsigned int i = 0;
         Weapon* weapon = 0;
-        while (weapon = wPack->getWeapon(i++))
+        while ((weapon = wPack->getWeapon(i++)))
             weapon->getWeaponSlot()->removeWeapon();
 
         // Remove all added links from the WeaponSets




More information about the Orxonox-commit mailing list