summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/items/shovel.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt
index b33cbbfae..fb73c82ee 100644
--- a/npc/items/shovel.txt
+++ b/npc/items/shovel.txt
@@ -36,8 +36,12 @@ function script shovel_scatter {
.@wtc = getarraysize($@WBT_Random_id);
debugmes "Asked to scatter "+.@amount+" items. Currently scattered: "+.@wtc;
+
+ freeloop(true); // DANGEROUS
for (.@i = 0; .@i < .@amount; .@i++)
shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), any_of(.@id));
+ freeloop(false);
+
debugmes "Scattered "+.@amount+" items on "+.@map$;
return;