This function is still checking for the inert state through the stategraph, which isn't added for clients.
local function PushMusic(inst) if ThePlayer == nil or (inst.sg and inst.sg:HasStateTag("inert")) then inst._playingmusic = false elseif ThePlayer:IsNear(inst, inst._playingmusic and 40 or 20) then inst._playingmusic = true ThePlayer:PushEvent("triggeredevent", { name = "crabking" }) elseif inst._playingmusic and not ThePlayer:IsNear(inst, 50) then inst._playingmusic = false end end
The only exception is for host players in worlds without caves, where the stategraph does exist, and music doesn't play as intended.
Steps to Reproduce
- Approach Crab King while he's in the inert state as a client player.
- Notice how the music will play when nearby despite the fight not being active.
- Repeat step as a host of a world without caves and compare. The music will correctly not play in this case.
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 accountSign in
Already have an account? Sign in here.
Sign In Now