GetOcclusionsEnabled: Difference between revisions
Jump to navigation
Jump to search
(new page) |
No edit summary |
||
Line 2: | Line 2: | ||
{{Server client function}} | {{Server client function}} | ||
This function is used to get "occlusions enabled" state. | This function is used to get "occlusions enabled" state. | ||
{{Note|Occlusions are used by GTA to enhance performance by hiding objects that are (normally) obscured by certain large buildings. However when [[removeWorldModel]] is used they may also have the undesired effect of making parts of the map disappear. Disabling occlusions will fix that.}} | |||
==Syntax== | ==Syntax== |
Latest revision as of 06:04, 11 August 2019
This function is used to get "occlusions enabled" state.
Note: Occlusions are used by GTA to enhance performance by hiding objects that are (normally) obscured by certain large buildings. However when removeWorldModel is used they may also have the undesired effect of making parts of the map disappear. Disabling occlusions will fix that. |
Syntax
bool getOcclusionsEnabled ( )
Returns
Returns true if occlusions are enabled, or false otherwise.
Example
This example shows how to disable occlusions after the whole map has been cleared:
-- Remove all world models for i=700,20000 do removeWorldModel(i,10000,0,0,0) end -- Turn off occlusions with simple check if getOcclusionsEnabled() then setOcclusionsEnabled( false ) end
Requirements
Minimum server version | 1.3 |
---|---|
Minimum client version | 1.3 |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3" client="1.3" />
See Also
Shared
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel