From 578560d2132188279e4b0930212edd915bc90008 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 1 Apr 2013 20:56:25 +0000 Subject: Proper fix for FS #347. Also unification of ticking block entities. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1348 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/DispenserEntity.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'source/DispenserEntity.cpp') diff --git a/source/DispenserEntity.cpp b/source/DispenserEntity.cpp index 3ace4a1cf..5b0af8e42 100644 --- a/source/DispenserEntity.cpp +++ b/source/DispenserEntity.cpp @@ -261,37 +261,6 @@ void cDispenserEntity::SetSlot(int a_Slot, const cItem & a_Item) -#define READ(File, Var) \ - if (File.Read(&Var, sizeof(Var)) != sizeof(Var)) \ - { \ - LOGERROR("ERROR READING cDispenserEntity %s FROM FILE (line %d)", #Var, __LINE__); \ - return false; \ - } - -bool cDispenserEntity::LoadFromFile(cFile & f) -{ - READ(f, m_PosX); - READ(f, m_PosY); - READ(f, m_PosZ); - - unsigned int NumSlots = 0; - READ(f, NumSlots); - m_Items = new cItem[ NumSlots ]; - for(unsigned int i = 0; i < NumSlots; i++) - { - cItem & Item = m_Items[i]; - READ(f, Item.m_ItemType); - READ(f, Item.m_ItemCount); - READ(f, Item.m_ItemDamage); - } - - return true; -} - - - - - bool cDispenserEntity::LoadFromJson( const Json::Value& a_Value ) { m_PosX = a_Value.get("x", 0).asInt(); -- cgit v1.2.3