Disable game item debug code since it's not maintained

ryzomclassic-develop
kaetemi 4 years ago
parent 7b1136ff0b
commit a5e9542f2f

@ -48,7 +48,9 @@ NL_INSTANCE_COUNTER_IMPL(CGameItem);
CGameItemVector CGameItem::_Items;
uint32 CGameItem::_FirstFreeItem;
#if 0
uint32 CGameItem::_BugTestCounter;
#endif
#if defined(ITEM_DEBUG) || defined(SAFE_ITEMS)
sint32 CGameItem::_NextAllocatorDataValue;
@ -750,7 +752,9 @@ void CGameItemPtr::deleteItem()
nlassert(item->_Ptrs.empty());
CGameItem::deleteItem(item);
#if 0
item->_BugTestUpdate=CGameItem::_BugTestCounter;
#endif
}
//-----------------------------------------------
@ -4625,6 +4629,7 @@ void CGameItem::postApply(INVENTORIES::TInventory refInventoryId, CCharacter * o
}
}
#if 0
//-----------------------------------------------
// variable used for debugging..
//-----------------------------------------------
@ -4724,6 +4729,7 @@ void CGameItem::testItemsForBugs()
nlassert(count==freeItemCount);
++_BugTestCounter;
}
#endif
//-----------------------------------------------
@ -4799,6 +4805,7 @@ void CGameItem::testItemsForBugs()
// }
//}
#if 0
//-----------------------------------------------
// testItemsForBugs
//-----------------------------------------------
@ -4853,7 +4860,9 @@ void CGameItem::checkItemForBugs()
//// nlassert(getRmUsedForCraft().size()<50);
// }
}
#endif
#if 0
//-----------------------------------------------
// COMMAND: testParanoidItemSystem
//-----------------------------------------------
@ -4918,6 +4927,7 @@ NLMISC_COMMAND(testParanoidItemSystem,"run some test code that should provoke a
//
//#undef TEST
}
#endif
//-----------------------------------------------
// testItemsForBugs
@ -5002,6 +5012,7 @@ std::string CGameItem::showItemsStats()
// freeItemCount,rootItemCount,attachedStackCount,detachedStackCount,stackChildrenCount,attachedItemCount,detachedItemCount, _Items.size(), sizeof(CGameItem) * _Items.size());
}
#if 0
//-----------------------------------------------
// COMMAND: launch item tests
//-----------------------------------------------
@ -5010,6 +5021,7 @@ NLMISC_COMMAND(testItemSystem,"call CGameItem::testItemsForBugs()","")
CGameItem::testItemsForBugs();
return true;
}
#endif
//-----------------------------------------------
// COMMAND: items stats

@ -805,22 +805,28 @@ private:
float getMagicProtectionCraftParateters( PROTECTION_TYPE::TProtectionType protection ) const;
private:
#if 0
// singleton counter
static uint32 _BugTestCounter;
// instance debug data
uint32 _BugTestChecksum;
uint32 _BugTestUpdate;
#endif
public:
#if 0
// run through the items looking for bugs
static void testItemsForBugs();
// static void testPlayerInventoryForBugs(const std::vector<CGameItemPtr>& inventory);
#endif
static std::string showItemsStats();
#if 0
// check a single item for bugs...
void checkItemForBugs();
#endif
public: // I've had to make these public for now 'cos I can't work out how to make the vector class a friend :o(
//private :
@ -1121,7 +1127,9 @@ inline CGameItem *CGameItemPtr::newItem(bool destroyable,bool dropable)
item->_Destroyable=destroyable;
item->_Dropable = dropable;
*this=item;
#if 0
item->_BugTestUpdate=CGameItem::_BugTestCounter;
#endif
return item;
}
@ -1142,7 +1150,9 @@ inline CGameItem *CGameItemPtr::newItem( const NLMISC::CSheetId& sheetId, uint32
// item->ctor(id,sheetId,recommended,slotCount,destroyable,dropable);
item->ctor(sheetId, recommended, destroyable, dropable);
*this=item;
#if 0
item->_BugTestUpdate = CGameItem::_BugTestCounter;
#endif
return item;
}
@ -1289,7 +1299,9 @@ inline CGameItem * CGameItemPtr::operator*() const
BOMB_IF(item==0, "Attempting to access an item an item that is not allocated or has been freed", return 0);
#if 0
item->_BugTestUpdate=CGameItem::_BugTestCounter;
#endif
return item;
}
@ -1310,7 +1322,9 @@ inline CGameItem *CGameItemPtr::operator->() const
BOMB_IF(item==0, "Attempting to access an item an item that is not allocated or has been freed", return 0);
#if 0
item->_BugTestUpdate=CGameItem::_BugTestCounter;
#endif
return item;
}

Loading…
Cancel
Save