Hi; I am new here and do not understand the result I get from this part of code I changed in a game. I am not really great in C++ and appreciate any explanation.
What does not work as intended is the section for Terrain::waterelevation and the additional condition for shallowDepth. The code compiles and the game uses it without error message but it does not differentiates between 197,198,199.
It only differentiates between <197 and 200 and not only ignores the other secection options but modifies the value to the first 197.
For me this is am ystery and I try to find out if there is something wrong with that part of the code or if the issue is created in other parts of a much,much larger code. I may not understand the restrictions of using else if.
I could not compile with a select..case structure because such variables can not be used in it.