Skip to content

Conversation

@FileEX
Copy link
Member

@FileEX FileEX commented Sep 2, 2024

Closes #3650

Syntax

Client

nil resetWorldProperties( [ bool resetSpecialProperties = true, bool resetWorldProperties = true, bool resetWeatherProperties = true, bool resetLODs = true, bool resetSounds = true ] )

Server

nil resetWorldProperties( [ bool resetSpecialProperties = true, bool resetWorldProperties = true, bool resetWeatherProperties = true, bool resetLODs = true, bool resetSounds = true, bool resetGlitches = true, bool resetJetpackWeapons = true ] )

resetSpecialProperties - Restores all special world properties changed by setWorldSpecialPropertyEnabled to default
resetWorldProperties - Reset all world properties changed by setWorldProperty
resetWeatherProperties - Reset all weather properties like heat haze, rain level, sun color etc
resetLODs - Reset vehicles and peds lod distance
resetSounds - Restore interior sounds, world sounds and ambient sounds

resetGlitches - Disable all glitches enabled by setGlitchEnabled
resetJetpackWeapons - Reset jetpack weapons changes by setJetpackWeaponEnabled to default (uzi, pistol, tec9)

Regardless of the value of the arguments, the following properties are reset:

  • Far clip distance
  • Near clip distance
  • Clouds (enabled)
  • Birds (enabled)
  • Occlusions (enabled)
  • Gravity
  • Game speed
  • Aircraft max height & velocity
  • Jetpack max height
  • Interior furnitures (enabled)
  • Minute duration
  • Blur level
  • Corona reflections
  • Traffic lights locked state
  • Water level and color
  • Wave height

@gownosatana
Copy link
Contributor

The function name should be resetWorldProperties, without all since you can change what should be disabled

@FileEX
Copy link
Member Author

FileEX commented Sep 2, 2024

The function name should be resetWorldProperties, without all since you can change what should be disabled

Yeah, you're right

@FileEX FileEX changed the title Add new function resetAllWorldProperties Add new function resetWorldProperties Sep 2, 2024
@Dutchman101
Copy link
Member

Please resolve conflicts

@FileEX
Copy link
Member Author

FileEX commented Sep 4, 2024

Please resolve conflicts

Done

Copy link
Member

@tederis tederis left a comment

Choose a reason for hiding this comment

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

LGTM

@tederis tederis merged commit 6df889e into multitheftauto:master Sep 10, 2024
MTABot pushed a commit that referenced this pull request Sep 10, 2024
6df889e Add new function resetWorldProperties (#3692)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a new function resetAllWorldPropertis

5 participants