aboutsummaryrefslogtreecommitdiff
path: root/internal/world
diff options
context:
space:
mode:
Diffstat (limited to 'internal/world')
-rw-r--r--internal/world/world.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/world/world.go b/internal/world/world.go
index 7768739..9bed76e 100644
--- a/internal/world/world.go
+++ b/internal/world/world.go
@@ -482,7 +482,8 @@ func (w *World) SeedGroundItems(roomID int) {
merged := false
for _, e := range w.groundItems[roomID] {
if e.quantity > 0 && strings.EqualFold(e.itemID, s.ItemID) &&
- (e.reserveTimer <= 0 || e.reservedFor == "") {
+ (e.reserveTimer <= 0 || e.reservedFor == "") &&
+ e.despawnTimer <= 0 {
e.quantity += s.Quantity
e.respawnQty += s.Quantity
e.isSpawn = true
@@ -516,7 +517,8 @@ func (w *World) Tick() {
e.quantity = e.respawnQty
for _, other := range entries {
if other != e && other.quantity > 0 && strings.EqualFold(other.itemID, e.itemID) &&
- (other.reserveTimer <= 0 || other.reservedFor == "") {
+ (other.reserveTimer <= 0 || other.reservedFor == "") &&
+ other.despawnTimer <= 0 {
e.quantity += other.quantity
other.quantity = 0
}