mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 06:41:36 +00:00
Cast double constant to float explicitely
This commit is contained in:
parent
7d5c5f8a24
commit
d10399e083
3 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ bool MWMechanics::AiBreathe::execute (const MWWorld::Ptr& actor, CharacterContro
|
||||||
actorClass.getCreatureStats(actor).setMovementFlag(CreatureStats::Flag_Run, true);
|
actorClass.getCreatureStats(actor).setMovementFlag(CreatureStats::Flag_Run, true);
|
||||||
|
|
||||||
actorClass.getMovementSettings(actor).mPosition[1] = 1;
|
actorClass.getMovementSettings(actor).mPosition[1] = 1;
|
||||||
smoothTurn(actor, -osg::PI / 2, 0);
|
smoothTurn(actor, static_cast<float>(-osg::PI_2), 0);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,7 +433,7 @@ namespace MWRender
|
||||||
void Camera::setPitch(float angle)
|
void Camera::setPitch(float angle)
|
||||||
{
|
{
|
||||||
const float epsilon = 0.000001f;
|
const float epsilon = 0.000001f;
|
||||||
float limit = osg::PI_2 - epsilon;
|
float limit = static_cast<float>(osg::PI_2) - epsilon;
|
||||||
mPitch = osg::clampBetween(angle, -limit, limit);
|
mPitch = osg::clampBetween(angle, -limit, limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace SceneUtil
|
||||||
osg::Vec3f dir = toPos - fromPos;
|
osg::Vec3f dir = toPos - fromPos;
|
||||||
dir.normalize();
|
dir.normalize();
|
||||||
|
|
||||||
osg::Quat rot = osg::Quat(-osg::PI / 2, osg::Vec3(0, 0, 1));
|
osg::Quat rot(static_cast<float>(-osg::PI_2), osg::Vec3f(0, 0, 1));
|
||||||
dir = rot * dir;
|
dir = rot * dir;
|
||||||
|
|
||||||
unsigned short diamondIndex = 0;
|
unsigned short diamondIndex = 0;
|
||||||
|
|
Loading…
Reference in a new issue