mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-26 06:40:22 +00:00
15 to landTextureSize-1
This commit is contained in:
parent
3327d6f7c4
commit
1c113eca9c
@ -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…
x
Reference in New Issue
Block a user