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

Add setVolumetricShadowsEnabled

Open fresholia opened this issue 4 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

Note: If the player leaves the server, setting should revert to their choice

~~What do you mean? Can scripts control that video setting on behalf of the client?~~

nevermind, didn't read title. try to include everything in the description of your issue, even if it's already in the title.

Lpsd avatar May 30 '21 17:05 Lpsd

Well, what addition do you want?

fresholia avatar May 30 '21 17:05 fresholia

I've updated your post as an example. Try to form full sentences and explain each part in as much detail - as though this is the first time someone has heard about volumetric shadows. As this is a "good first issue", it will help new contributors and also set a standard for their own issue submissions.

Lpsd avatar May 30 '21 18:05 Lpsd

Thank you

fresholia avatar May 30 '21 18:05 fresholia

Closeable

Nico8345 avatar Sep 29 '24 01:09 Nico8345

Closeable

@botder

Proxy-99 avatar Jan 05 '25 08:01 Proxy-99

Fixed in 6c93a49c4c2381f4ce84df195d98d36372a47d37

botder avatar Jan 05 '25 09:01 botder