summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockEntities')
-rw-r--r--src/BlockEntities/DropSpenserEntity.cpp5
1 files changed, 2 insertions, 3 deletions
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))
{