1
0
forked from 0ad/0ad

Fixes MSVC build error and warning

This was SVN commit r13375.
This commit is contained in:
historic_bruno 2013-04-27 22:43:22 +00:00
parent 4233acfa36
commit d9540ad7f6

View File

@ -377,14 +377,14 @@ void WaterManager::CreateSuperfancyInfo(CSimulation2* simulation)
} }
// normalizes the terrain info to avoid foam moving at too different speeds. // normalizes the terrain info to avoid foam moving at too different speeds.
normal *= 0.012345679f; normal *= 0.012345679f;
normal[1] = 0.1; normal[1] = 0.1f;
normal = normal.Normalized(); normal = normal.Normalized();
m_WaveX[j*mapSize + i] = normal[0]; m_WaveX[j*mapSize + i] = normal[0];
m_WaveZ[j*mapSize + i] = normal[2]; m_WaveZ[j*mapSize + i] = normal[2];
// distance is /5.0 to be a [0,1] value. // distance is /5.0 to be a [0,1] value.
m_DistanceToShore[j*mapSize + i] = sqrt(distanceToShore)/5.0; // TODO: this can probably be cached as I'm integer here. m_DistanceToShore[j*mapSize + i] = sqrtf(distanceToShore)/5.0f; // TODO: this can probably be cached as I'm integer here.
// computing the amount of foam I want // computing the amount of foam I want