File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -1601,14 +1601,9 @@ void TerrainShader2Stage::updateCloud()
16011601 m_xOffset += m_xSlidePerSecond * frame_time;
16021602 m_yOffset += m_ySlidePerSecond * frame_time;
16031603
1604- if (m_xOffset > 1 .0f )
1605- m_xOffset -= (Int)m_xOffset;
1606- if (m_yOffset > 1 .0f )
1607- m_yOffset -= (Int)m_yOffset;
1608- if (m_xOffset < -1 .0f )
1609- m_xOffset += (Int)-m_xOffset;
1610- if (m_yOffset < -1 .0f )
1611- m_yOffset += (Int)-m_yOffset;
1604+ // This moves offsets towards zero when smaller -1.0 or larger 1.0
1605+ m_xOffset -= (Int)m_xOffset;
1606+ m_yOffset -= (Int)m_yOffset;
16121607}
16131608
16141609void TerrainShader2Stage::updateNoise1 (D3DXMATRIX *destMatrix,D3DXMATRIX *curViewInverse, Bool doUpdate)
You can’t perform that action at this time.
0 commit comments