mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-08-12 17:54:41 +02:00
fixed look behind bug
This commit is contained in:
@@ -627,7 +627,7 @@ CCam::LookBehind(void)
|
|||||||
DeltaBeta = TargetOrientation - Beta;
|
DeltaBeta = TargetOrientation - Beta;
|
||||||
while(DeltaBeta >= PI) DeltaBeta -= 2*PI;
|
while(DeltaBeta >= PI) DeltaBeta -= 2*PI;
|
||||||
while(DeltaBeta < -PI) DeltaBeta += 2*PI;
|
while(DeltaBeta < -PI) DeltaBeta += 2*PI;
|
||||||
if(DirectionWasLooking == LOOKING_BEHIND)
|
if(DirectionWasLooking != LOOKING_BEHIND)
|
||||||
LookBehindCamWasInFront = DeltaBeta <= -HALFPI || DeltaBeta >= HALFPI;
|
LookBehindCamWasInFront = DeltaBeta <= -HALFPI || DeltaBeta >= HALFPI;
|
||||||
if(LookBehindCamWasInFront)
|
if(LookBehindCamWasInFront)
|
||||||
TargetOrientation += PI;
|
TargetOrientation += PI;
|
||||||
|
Reference in New Issue
Block a user