From Multi Theft Auto: Wiki
Revision as of 05:33, 27 February 2012 by MX Master (talk | contribs) (new page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.


bool getOcclusionsEnabled ( )


Returns true if occlusions are enabled, or false otherwise.


This example shows how to disable occlusions after the whole map has been cleared:

-- Remove all world models
for i=700,20000 do

-- Turn off occlusions with simple check
if getOcclusionsEnabled() then
    setOcclusionsEnabled( false )


Minimum supported server 1.3
Minimum supported client 1.3
Note: Using this function 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