Fix horizontal scrolling of background images.
parent
2e8798b33d
commit
8b0ccf6667
|
@ -4741,8 +4741,9 @@ void CEngine::DrawBackgroundImage()
|
||||||
if (a > Math::PI/4.0f) a = Math::PI/4.0f;
|
if (a > Math::PI/4.0f) a = Math::PI/4.0f;
|
||||||
if (a < -Math::PI/4.0f) a = -Math::PI/4.0f;
|
if (a < -Math::PI/4.0f) a = -Math::PI/4.0f;
|
||||||
|
|
||||||
u1 = -m_eyeDirH/Math::PI;
|
// Note the background covers Math::PI radians, i.e. it repeats twice per rotation!
|
||||||
u2 = u1+1.0f/Math::PI;
|
u1 = (-m_eyeDirH - GetHFovAngle()/2.0f) / Math::PI;
|
||||||
|
u2 = u1 + (GetHFovAngle() / Math::PI);
|
||||||
|
|
||||||
v1 = (1.0f-h)*(0.5f+a/(2.0f*Math::PI/4.0f))+0.1f;
|
v1 = (1.0f-h)*(0.5f+a/(2.0f*Math::PI/4.0f))+0.1f;
|
||||||
v2 = v1+h;
|
v2 = v1+h;
|
||||||
|
|
Loading…
Reference in New Issue