Jump to content

Crab King event is triggered prematurely on clients


Tykvesh
  • Pending

Probably adding a networked boolean to enable the music (similar to the Dragonfly) would be a better solution, but the stuff below could be a quick fix.

local function PushMusic(inst)
	if ThePlayer == nil or (inst.sg and inst.sg:HasStateTag("inert")) then
		inst._playingmusic = false
local function PushMusic(inst)
	if ThePlayer == nil or inst:HasTag("noattack") then
		inst._playingmusic = false

 


Steps to Reproduce
  1. Create a world with caves
  2. Go near the inert Crab King
  • Like 2



User Feedback


Consider looking at this suggestion, where the bug is also fixed

--Dedicated server does not need to trigger music
if not TheNet:IsDedicated() then
	MakeEventTriggerer(inst, "crabking", true, "noattack", 20, 40, 50)
end

 

Edited by Tykvesh

Share this comment


Link to comment
Share on other sites



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...