The Wayback Machine - https://web.archive.org/web/20210530182519/https://github.com/multitheftauto/mtasa-blue/issues/2248
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setVolumetricShadowsEnabled #2248

Open
cleopatradev opened this issue May 30, 2021 · 4 comments
Open

Add setVolumetricShadowsEnabled #2248

cleopatradev opened this issue May 30, 2021 · 4 comments

Comments

@cleopatradev
Copy link
Contributor

@cleopatradev cleopatradev commented May 30, 2021

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);
@Lpsd
Copy link
Member

@Lpsd Lpsd commented May 30, 2021

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.

@cleopatradev
Copy link
Contributor Author

@cleopatradev cleopatradev commented May 30, 2021

Well, what addition do you want?

@Lpsd
Copy link
Member

@Lpsd Lpsd commented May 30, 2021

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.

@cleopatradev
Copy link
Contributor Author

@cleopatradev cleopatradev commented May 30, 2021

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment