Remove unwanted ! from ifs in inventory record-for-rollback code
authorPerttu Ahola <celeron55@gmail.com>
Sun, 12 Aug 2012 08:09:38 +0000 (11:09 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 12 Aug 2012 08:20:36 +0000 (11:20 +0300)
src/inventorymanager.cpp

index 7fc8c8ce4539c3f288ae565be993421ea9d24d0d..424b02b53fbd8c0e0fdc38053de7336920cfbbf5 100644 (file)
@@ -360,7 +360,7 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
                IRollbackReportSink *rollback = gamedef->rollback();
 
                // If source is not infinite, record item take
-               if(!src_can_take_count != -1){
+               if(src_can_take_count != -1){
                        RollbackAction action;
                        std::string loc;
                        {
@@ -373,7 +373,7 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
                        rollback->reportAction(action);
                }
                // If destination is not infinite, record item put
-               if(!dst_can_put_count != -1){
+               if(dst_can_put_count != -1){
                        RollbackAction action;
                        std::string loc;
                        {
@@ -633,7 +633,7 @@ void IDropAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
                IRollbackReportSink *rollback = gamedef->rollback();
 
                // If source is not infinite, record item take
-               if(!src_can_take_count != -1){
+               if(src_can_take_count != -1){
                        RollbackAction action;
                        std::string loc;
                        {