Add new functions related to underwater effects#3463
Conversation
|
Great! We can fix #2598 by checking if the underwater effect is on, maybe after this PR merged? |
|
Currently, |
I think we should be able to check the effect anytime without relying on setCameraUnderwaterEffectEnabled |
|
resetCameraUnderwaterEffect() should not this also reset darkness too and getCameraUnderwaterEffect() should not also get the darkness level too |
|
Nice job! |
|
Good job, but please address the requested changed |
|
Bump? |
|
can you fix the build @XJMLN |
| return true; | ||
| } | ||
|
|
||
| bool CLuaCameraDefs::SetCameraUnderwaterEffectSpeed(float fSpeed, std::optional<float> fFrequency) |
There was a problem hiding this comment.
This is incompatible with the declaration given in the header: static bool SetCameraUnderwaterEffectSpeed(float speed, float frequency);
|
@XJMLN Please, fix the project build. |
Client functions
setCameraUnderwaterEffectEnabled(bool state)- Enable or disable the underwater effect. This function does not affect the default diving behavior.setCameraUnderwaterEffectSpeed(float speed, float frequency)- Change the speed and frequency of the underwater effectsetCameraUnderwaterDarkness(bool state, float maxDarknessDepth)- Enable or disable the screen getting darker as we dive deeper underwater. We can also set the depth at which the screen goes completely dark.getCameraUnderwaterEffect() -> bool enabled, float speed, float frequencygetCameraUnderwaterDarkness() -> bool enabled, float maxDarknessDepthresetCameraUnderwaterEffect()- Reset the underwater effect state, speed and frequency to their default valuesresetCameraUnderwaterDarkness()- Reset the underwater darkness effect state and maximum darkness depth to their default valuesResolves #1297