mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Add setVolumetricShadowsEnabled

Open fresholia opened this issue 3 years ago • 5 comments

We should add a new Lua function, setVolumetricShadowsEnabled, on the client-side only.

bool setVolumetricShadowsEnabled(bool state)

Returns true if successful, false otherwise

The volumetric shadows option can already be changed by the client in MTA Settings > Video > Volumetric Shadows.

Any server using this function will override the client's choice until they leave the server, upon which it will revert to the client's original choice.

implementation example

CGameSettings* pGameSettings = m_pGame->GetSettings();
pGameSettings->SetVolumetricShadowsEnabled(true/false);

fresholia avatar May 30 '21 17:05 fresholia