adress odd water values

review of watergrid value exposure and transform saver usage
This commit is contained in:
AzaezelX 2025-08-02 15:04:43 -05:00
parent 81504fb089
commit 96134e12ad
4 changed files with 9 additions and 9 deletions

View file

@ -124,9 +124,7 @@ void WaterPlane::initPersistFields()
addProtectedFieldV( "gridSize", TypeRangedS32, Offset( mGridSize, WaterPlane ), &protectedSetGridSize, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
"Spacing between vertices in the WaterBlock mesh" );
addProtectedFieldV( "gridElementSize", TypeRangedS32, Offset( mGridElementSize, WaterPlane ), &protectedSetGridElementSize, &defaultProtectedGetFn, &CommonValidators::NaturalNumber,
"Duplicate of gridElementSize for backwards compatility");
addProtectedFieldV("gridElementSize", TypeRangedF32, Offset(mGridElementSize, WaterPlane), &protectedSetGridElementSize, &defaultProtectedGetFn, &CommonValidators::PositiveFloat, "Duplicate of gridElementSize for backwards compatility");
endGroup( "WaterPlane" );
@ -699,6 +697,8 @@ void WaterPlane::prepRenderImage( SceneRenderState *state )
if( !state->isDiffusePass() )
return;
GFXTransformSaver saver;
mBasicLighting = dStricmp( LIGHTMGR->getId(), "BLM" ) == 0;
mUnderwater = isUnderwater( state->getCameraPosition() );