Use exact value comparison in caching related functions
(cherry picked from commit 9d7c6b26422e127719836944d8d473910190e7d4)
This commit is contained in:
@@ -260,7 +260,7 @@ void Terrain::SetScaleInLightmap(float value)
|
||||
|
||||
void Terrain::SetBoundsExtent(const Vector3& value)
|
||||
{
|
||||
if (Vector3::NearEqual(_boundsExtent, value))
|
||||
if (_boundsExtent == value)
|
||||
return;
|
||||
|
||||
_boundsExtent = value;
|
||||
@@ -891,7 +891,7 @@ void Terrain::OnTransformChanged()
|
||||
auto patch = _patches[i];
|
||||
patch->UpdateTransform();
|
||||
}
|
||||
if (!Float3::NearEqual(_cachedScale, _transform.Scale))
|
||||
if (_cachedScale != _transform.Scale)
|
||||
{
|
||||
_cachedScale = _transform.Scale;
|
||||
for (int32 i = 0; i < _patches.Count(); i++)
|
||||
|
||||
Reference in New Issue
Block a user