mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-19 15:39:49 +00:00
Merge declaration and initialization
This commit is contained in:
parent
1930f8f37d
commit
ad101de733
1 changed files with 2 additions and 4 deletions
|
@ -427,10 +427,8 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||
{
|
||||
if (i_cell == cellX && j_cell == cellY && abs(i-xHitInCell) < r && abs(j-yHitInCell) < r)
|
||||
{
|
||||
int distanceX(0);
|
||||
int distanceY(0);
|
||||
distanceX = abs(i-xHitInCell);
|
||||
distanceY = abs(j-yHitInCell);
|
||||
int distanceX = abs(i-xHitInCell);
|
||||
int distanceY = abs(j-yHitInCell);
|
||||
float distance = std::round(sqrt(pow(distanceX, 2)+pow(distanceY, 2)));
|
||||
float rf = static_cast<float>(mBrushSize) / 2;
|
||||
if (distance < rf) newTerrain[j*landTextureSize+i] = brushInt;
|
||||
|
|
Loading…
Reference in a new issue