Skip to content

Commit

Permalink
Boombox spawning hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Damgam committed Apr 1, 2024
1 parent b00f8af commit 9eaf6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luarules/gadgets/game_boombox_spawner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function gadget:GameFrame(frame)
if math.random(1,10) == 1 then
for j = 1,1000 do
local posx = math.random(math.floor(Game.mapSizeX*0.02), math.ceil(Game.mapSizeX*0.98))
local posz = math.random(math.floor(Game.mapSizeX*0.02), math.ceil(Game.mapSizeX*0.98))
local posz = math.random(math.floor(Game.mapSizeZ*0.02), math.ceil(Game.mapSizeZ*0.98))
local posy = Spring.GetGroundHeight(posx, posz)
local blockerDistance = getNearestBlocker(posx, posz)
if posy > 0 and positionCheckLibrary.FlatAreaCheck(posx, posy, posz, 64, 25, true) and blockerDistance > 196 then
Expand Down

0 comments on commit 9eaf6cc

Please sign in to comment.