From 71b96ab921bed0371d7c75ac4a2db99b94591de2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 22 Sep 2020 11:08:12 +0100 Subject: Limit fortune level, style fixes --- src/BlockEntities/DropSpenserEntity.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/BlockEntities') diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp index 243ec8594..259cec7a3 100644 --- a/src/BlockEntities/DropSpenserEntity.cpp +++ b/src/BlockEntities/DropSpenserEntity.cpp @@ -79,9 +79,8 @@ void cDropSpenserEntity::DropSpense(cChunk & a_Chunk) return; } - int RandomSlot = m_World->GetTickRandomNumber(SlotsCnt - 1); - - int SpenseSlot = OccupiedSlots[RandomSlot]; + const int RandomSlot = m_World->GetTickRandomNumber(SlotsCnt - 1); + const int SpenseSlot = OccupiedSlots[RandomSlot]; if (cPluginManager::Get()->CallHookDropSpense(*m_World, *this, SpenseSlot)) { -- cgit v1.2.3