浏览代码

flowMagnitude and ripplespeed can go negative

AzaezelX 6 月之前
父节点
当前提交
289d42cc10
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Engine/source/environment/river.cpp
  2. 1 1
      Engine/source/environment/waterObject.cpp

+ 1 - 1
Engine/source/environment/river.cpp

@@ -640,7 +640,7 @@ void River::initPersistFields()
          "For purposes of generating the renderable geometry River segments are further subdivided "
          "For purposes of generating the renderable geometry River segments are further subdivided "
          "such that no quad is of greater width or length than this distance in meters." );
          "such that no quad is of greater width or length than this distance in meters." );
 
 
-      addFieldV( "FlowMagnitude", TypeRangedF32,    Offset( mFlowMagnitude, River ), &CommonValidators::PositiveFloat,
+      addFieldV( "FlowMagnitude", TypeRangedF32,    Offset( mFlowMagnitude, River ), &CommonValidators::F32Range,
          "Magnitude of the force vector applied to dynamic objects within the River." );
          "Magnitude of the force vector applied to dynamic objects within the River." );
 
 
       addFieldV( "LowLODDistance", TypeRangedF32,    Offset( mLodDistance, River ), &CommonValidators::PositiveFloat,
       addFieldV( "LowLODDistance", TypeRangedF32,    Offset( mLodDistance, River ), &CommonValidators::PositiveFloat,

+ 1 - 1
Engine/source/environment/waterObject.cpp

@@ -305,7 +305,7 @@ void WaterObject::initPersistFields()
       addArray( "Ripples (texture animation)", MAX_WAVES );
       addArray( "Ripples (texture animation)", MAX_WAVES );
 
 
          addField( "rippleDir",       TypePoint2F, Offset( mRippleDir, WaterObject ), MAX_WAVES, "Modifies the direction of ripples on the surface." );
          addField( "rippleDir",       TypePoint2F, Offset( mRippleDir, WaterObject ), MAX_WAVES, "Modifies the direction of ripples on the surface." );
-         addFieldV( "rippleSpeed", TypeRangedF32, Offset( mRippleSpeed, WaterObject ), &CommonValidators::PositiveFloat, MAX_WAVES, "Modifies speed of surface ripples.");
+         addFieldV( "rippleSpeed", TypeRangedF32, Offset( mRippleSpeed, WaterObject ), &CommonValidators::F32Range, MAX_WAVES, "Modifies speed of surface ripples.");
          addField( "rippleTexScale",  TypePoint2F, Offset( mRippleTexScale, WaterObject ), MAX_WAVES, "Intensifies the affect of the normal map "
          addField( "rippleTexScale",  TypePoint2F, Offset( mRippleTexScale, WaterObject ), MAX_WAVES, "Intensifies the affect of the normal map "
 			 "applied to the surface.");
 			 "applied to the surface.");
          addFieldV( "rippleMagnitude", TypeRangedF32, Offset( mRippleMagnitude, WaterObject ), &CommonValidators::PositiveFloat, MAX_WAVES, "Intensifies the vertext modification of the surface." );
          addFieldV( "rippleMagnitude", TypeRangedF32, Offset( mRippleMagnitude, WaterObject ), &CommonValidators::PositiveFloat, MAX_WAVES, "Intensifies the vertext modification of the surface." );