Closed Einheit-101 closed 3 years ago
That parameter does not let you ignore the waves, this is just bad naming.
That parameter makes the function return false, if the difference between reported water level and provided z value is greated than 3.0, or: (level - positionZ) > 3.0
.
If there is demand for a getWaterLevel, which ignores water level, then I could create a pull request for that: https://github.com/botder/mtasa-blue/tree/feature/waterlevel-nowaves. That branch adds getWaterLevelNoWaves, which returns the z position followed by the wave cos/sin values.
I think there is no real need for this. I recommend changing wiki description, maybe. But would it be possible to hide that wave quad with a new function to be able to replace it with a custom wave shader? Right now GTA is rendering 2 water surfaces together, one being the flat water and one being the animated waves.
I changed the description in the wiki. Create a new issue if you want a new feature for world water/waves.
Change reflected on Wiki https://wiki.multitheftauto.com/wiki/GetWaterLevel Issue closed
Describe the bug Currently getWaterLevel() returns the same values, no matter if bCheckWaves is true or false.
To Reproduce
Expected behavior getWaterLevel(x, y, z, false) should return a constant number, the actual water level that has been set with setWaterLevel() or the default water level, in this case 0.2. It should not take care of wave height.
MTA Client (please complete the following information): MTA SA 1.5.6 for Windows r14334