Skip to content
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

Rework World/Environnement sync #43

Open
10 tasks
Deewarz opened this issue Jan 11, 2024 · 0 comments
Open
10 tasks

Rework World/Environnement sync #43

Deewarz opened this issue Jan 11, 2024 · 0 comments
Labels
enhancement New feature or request priority:medium

Comments

@Deewarz
Copy link
Contributor

Deewarz commented Jan 11, 2024

Curently, weather set and time are mixed between World and Environment depending on the location and also in the way the synchronization is done.

https://github.com/MafiaHub/MafiaMP/blob/master/code/server/src/core/builtins/world.h

We should simplify and bring everything together on World.

Also, time flow is automaticaly managed by the game.
We should give this ownerrship to the scripter who can update the time manually at the pace he wants. (like it's done currenlty in the gamemode) (this also avoids having to synchronize our stuff with the game)

Tasks

Remove Environment thing

  • Cleanup and sync weather set and time on the World directly

Give scripter ownership on the time flow

SDK API

  • Rename SetWeather to SetWeatherSet
  • Add GetWeatherSet
  • Rename setDayTimeHours to SetTime
  • Check the value passed to SetTime is a float between 0.0 and 24.0
  • Add GetTime (hook: C_WeatherManager2__GetDayTimeHoursAddr)
  • Attach SetWeatherSet, GetWeatherSet, SetTime and GetTime to the World node module
  • Update gamemode with the new naming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:medium
Projects
Status: No status
Development

No branches or pull requests

2 participants