mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 13:09:42 +00:00
15 to landTextureSize-1
This commit is contained in:
parent
3327d6f7c4
commit
1c113eca9c
1 changed files with 2 additions and 2 deletions
|
@ -277,7 +277,7 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||
{
|
||||
for(int j=-mBrushSize/2;j<mBrushSize/2;j++)
|
||||
{
|
||||
if (xInCell+i >= 0 && yInCell+j >= 0 && xInCell+i <= 15 && yInCell+j <= 15)
|
||||
if (xInCell+i >= 0 && yInCell+j >= 0 && xInCell+i <= landTextureSize - 1 && yInCell+j <= landTextureSize - 1)
|
||||
mNew[(yInCell+j)*landTextureSize+(xInCell+i)] = brushInt;
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||
for(int j = -r; j < r; j++)
|
||||
{
|
||||
distance = std::round(sqrt(pow((xInCell+i)-xInCell, 2) + pow((yInCell+j)-yInCell, 2)));
|
||||
if (xInCell+i >= 0 && yInCell+j >= 0 && xInCell+i <= 15 && yInCell+j <= 15 && distance <= rf)
|
||||
if (xInCell+i >= 0 && yInCell+j >= 0 && xInCell+i <= landTextureSize - 1 && yInCell+j <= landTextureSize - 1 && distance <= rf)
|
||||
mNew[(yInCell+j)*landTextureSize+(xInCell+i)] = brushInt;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue