1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-04 15:45:32 +00:00

Merge remote-tracking branch 'scrawl/master'

This commit is contained in:
Marc Zinnschlag 2013-04-07 19:43:39 +02:00
commit 5dc1a00544

View file

@ -242,14 +242,15 @@ namespace MWRender
void Player::setPitch(float angle) void Player::setPitch(float angle)
{ {
float limit = Ogre::Math::HALF_PI; const float epsilon = 0.000001;
float limit = Ogre::Math::HALF_PI - epsilon;
if (mVanity.forced || mPreviewMode) { if (mVanity.forced || mPreviewMode) {
limit /= 2; limit /= 2;
} }
if (angle > limit) { if (angle > limit) {
angle = limit - 0.01; angle = limit;
} else if (angle < -limit) { } else if (angle < -limit) {
angle = -limit + 0.01; angle = -limit;
} }
if (mVanity.enabled || mPreviewMode) { if (mVanity.enabled || mPreviewMode) {
mPreviewCam.pitch = angle; mPreviewCam.pitch = angle;