They aren't able to trigger their listeners properly due to being set up like a net_bool rather than a net_event. Seems pointless to keep them around when they don't function.
eyeofterror
inst._musicdirty = net_event(inst.GUID, "eyeofterror._musicdirty", "musicdirty") inst._playingmusic = false --inst._musictask = nil OnMusicDirty(inst) inst.entity:SetPristine() if not TheWorld.ismastersim then inst:ListenForEvent("musicdirty", OnMusicDirty) return inst end
alterguardian_phase1, alterguardian_phase2, alterguardian_phase3 (example below is for alterguardian_phase1, but they're the same outside of phase number differing)
inst._musicdirty = net_event(inst.GUID, "alterguardian_phase1._musicdirty", "musicdirty") inst._playingmusic = false --inst._musictask = nil OnMusicDirty(inst) inst.entity:SetPristine() if not TheWorld.ismastersim then inst:ListenForEvent("musicdirty", OnMusicDirty) return inst end
Only eyeofterror lacks the bit below as well as the push() call to fire the events:
local function SetNoMusic(inst, val)
if val then
inst:AddTag("nomusic")
else
inst:RemoveTag("nomusic")
end
inst._musicdirty:push()
OnMusicDirty(inst)
end
inst._musicdirty:push() does nothing, and given that a periodic task is scheduled since initializing, which then checks for the "nomusic" or "INLIMBO" tag, it would make sense to just get rid of the net variables and listeners entirely, keep a function to run on initializing (like OnMusicDirty, just maybe change the name to avoid confusion), and let the periodic tasks handle things as they currently do.
No steps to reproduce, this doesn't have any effects on gameplay.
- 1
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 accountSign in
Already have an account? Sign in here.
Sign In Now