forked from teamnwah/openmw-tes3coop
Fix Windows warning
warning C4244: 'initializing' : conversion from 'float' to 'int', possible loss of data
This commit is contained in:
parent
946dd16696
commit
70e4f821ba
1 changed files with 2 additions and 2 deletions
|
@ -342,8 +342,8 @@ namespace ESSImport
|
||||||
{
|
{
|
||||||
// exterior cell -> determine cell coordinates based on position
|
// exterior cell -> determine cell coordinates based on position
|
||||||
const int cellSize = 8192;
|
const int cellSize = 8192;
|
||||||
int cellX = std::floor(context.mPlayer.mObject.mPosition.pos[0]/cellSize);
|
int cellX = static_cast<int>(std::floor(context.mPlayer.mObject.mPosition.pos[0]/cellSize));
|
||||||
int cellY = std::floor(context.mPlayer.mObject.mPosition.pos[1]/cellSize);
|
int cellY = static_cast<int>(std::floor(context.mPlayer.mObject.mPosition.pos[1] / cellSize));
|
||||||
context.mPlayer.mCellId.mIndex.mX = cellX;
|
context.mPlayer.mCellId.mIndex.mX = cellX;
|
||||||
context.mPlayer.mCellId.mIndex.mY = cellY;
|
context.mPlayer.mCellId.mIndex.mY = cellY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue