Skip to content

Commit

Permalink
Merge pull request #21 from SSnowly/main
Browse files Browse the repository at this point in the history
fix(client): sync blackout state with client
  • Loading branch information
FjamZoo authored Oct 25, 2024
2 parents 3a38a1c + d6bbb45 commit cdab5a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/weather.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,20 @@ CreateThread(function ()
while not NetworkIsSessionStarted() do -- Possible fix for slow clients
Wait(100)
end

SetWind(0.1)
WaterOverrideSetStrength(0.5)

setWeather(true)

playerState.syncWeather = true
playerState.playerWeather = 'EXTRASUNNY'

-- set blackout to the same state as server has
if type(GlobalState.blackout) == 'boolean' then
SetArtificialLightsState(GlobalState.blackout)
end

SetArtificialLightsStateAffectsVehicles(false)
end)

AddStateBagChangeHandler('syncWeather', ('player:%s'):format(cache.serverId), function(_, _, value)
Expand Down

0 comments on commit cdab5a9

Please sign in to comment.