Jump to content

Moon Altar Spawning Bugged


Hornete
  • Pending

When mining the dead Celestial Champion, the altar pieces will occasionally spawn like this, which looks very odd.

unknown.png

This is because it's spawning code is not working properly, and detects items and other such regular entities as being blockers.

local PIECEBLOCKER_CANT = {"INLIMBO", "FX", "DECOR", "NOCLICK", "flying", "ghost", "playerghost"}
local function altarpiece_spawn_checkfn(v)
    local ents = TheSim:FindEntities(v.x, v.y, v.z, 1.5, nil, PIECEBLOCKER_CANT)
    return #ents == 0
end

This is because in the altarpiece_spawn_checkfn function in alterguardian_phase3dead that's passed into FindWalkableOffset, it's using the PIECEBLOCKER for the canttags parameter in TheSim:FindEntities. This means it returns all entities BUT the defined blockers in the list of tags, meaning it'll count items, and other entities that aren't actual blockers.

Instead PIECEBLOCKER_CANT should be passed to the 5th parameter, after the 1.5 (and also rename to PIECEBLOCKER_CAN :p)


Steps to Reproduce

1. Mine alterguardian_phase3dead with a bunch of items around
2. Notice how weirdly it spawns

  • Like 1



User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...