Skip to content

freeroam: Fix warning when time is set to freeze #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2020
Merged

freeroam: Fix warning when time is set to freeze #229

merged 2 commits into from
Jul 19, 2020

Conversation

LosFaul
Copy link
Contributor

@LosFaul LosFaul commented Jul 16, 2020

Fix warning when time is set to freeze in fr_client.lua

grafik

@LosFaul LosFaul changed the title Fix warning when time is set to freeze Freeroam: Fix warning when time is set to freeze Jul 16, 2020
Comment on lines +1880 to 1882
freezeTimeHour, freezeTimeMinute = getTime()
freezeTimeWeather = getWeather()
setTimeFrozen(state)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the fix just to do setTimeFrozen(state, freezeTimeHour, freezeTimeMinute, freezeTimeWeather) and there's no need for a global? Or does this also support changing time/weather while frozen (and it will freeze to the new time/weather).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someone was complaining that it would change time/weather back few seconds later to the state freeze was enbaled
so, i added the 3 variables to keep the state updated when time and weather get changed while freeze is enabled

@qaisjp qaisjp changed the title Freeroam: Fix warning when time is set to freeze freeroam: Fix warning when time is set to freeze Jul 19, 2020
@qaisjp qaisjp merged commit e29f651 into multitheftauto:master Jul 19, 2020
@qaisjp qaisjp added this to the 1.5.8 milestone Nov 2, 2020
@LosFaul LosFaul deleted the patch-1 branch March 29, 2021 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants