Fix new duty sync

This should have been placed in a `onPlayerLoaded()` but it was checking at script start for player info before that info was able to be grabbed
This commit is contained in:
Jim Shield
2025-05-02 12:29:02 +01:00
parent 0accdda2dd
commit b7a284e051

View File

@@ -14,7 +14,13 @@
-------------------------------------------------------------
-- This attempts to sync up with the players framework onDuty variable
-- This stops the script getting confused when one is false and one is true
onDuty = not isServer() and getPlayer().onDuty or false
onDuty = false
if not isServer() then
onPlayerLoaded(function()
onDuty = getPlayer().onDuty
end, true)
end
-------------------------------------------------------------
-- Boss Role Detection