mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 07:09:42 +00:00
Use floats, not doubles
This commit is contained in:
parent
840e7615f5
commit
23fe3d74ab
2 changed files with 7 additions and 7 deletions
|
@ -307,10 +307,10 @@ bool CSVRender::InstanceMode::primaryEditStartDrag (const QPoint& pos)
|
|||
if (mSubModeId == "move")
|
||||
{
|
||||
objectTag->mObject->setEdited (Object::Override_Position);
|
||||
double x = objectTag->mObject->getPosition().pos[0];
|
||||
double y = objectTag->mObject->getPosition().pos[1];
|
||||
double z = objectTag->mObject->getPosition().pos[2];
|
||||
osg::Vec3d thisPoint(x, y, z);
|
||||
float x = objectTag->mObject->getPosition().pos[0];
|
||||
float y = objectTag->mObject->getPosition().pos[1];
|
||||
float z = objectTag->mObject->getPosition().pos[2];
|
||||
osg::Vec3f thisPoint(x, y, z);
|
||||
mDragStart = getMousePlaneCoords(pos, getProjectionSpaceCoords(thisPoint));
|
||||
mObjectsAtDragStart.emplace_back(thisPoint);
|
||||
mDragMode = DragMode_Move;
|
||||
|
@ -510,7 +510,7 @@ void CSVRender::InstanceMode::drag (const QPoint& pos, int diffX, int diffY, dou
|
|||
if (mDragMode == DragMode_Move)
|
||||
{
|
||||
ESM::Position position = objectTag->mObject->getPosition();
|
||||
osg::Vec3d mousePos = getMousePlaneCoords(pos, getProjectionSpaceCoords(mDragStart));
|
||||
osg::Vec3f mousePos = getMousePlaneCoords(pos, getProjectionSpaceCoords(mDragStart));
|
||||
float addToX = mousePos.x() - mDragStart.x();
|
||||
float addToY = mousePos.y() - mDragStart.y();
|
||||
float addToZ = mousePos.z() - mDragStart.z();
|
||||
|
|
|
@ -45,8 +45,8 @@ namespace CSVRender
|
|||
bool mLocked;
|
||||
float mUnitScaleDist;
|
||||
osg::ref_ptr<osg::Group> mParentNode;
|
||||
osg::Vec3d mDragStart;
|
||||
std::vector<osg::Vec3d> mObjectsAtDragStart;
|
||||
osg::Vec3f mDragStart;
|
||||
std::vector<osg::Vec3f> mObjectsAtDragStart;
|
||||
|
||||
int getSubModeFromId (const std::string& id) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue