diff -r 46a9fde631f4 -r 75db7bb8dce8 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Wed Jan 02 11:11:49 2013 +0100 +++ b/hedgewars/uWorld.pas Sun Jan 27 00:28:57 2013 +0100 @@ -78,7 +78,7 @@ FPS: Longword; CountTicks: Longword; SoundTimerTicks: Longword; - prevPoint: TPoint; + prevPoint, prevTargetPoint: TPoint; amSel: TAmmoType = amNothing; missionTex: PTexture; missionTimer: LongInt; @@ -89,7 +89,6 @@ AmmoMenuTex : PTexture; HorizontOffset: LongInt; cOffsetY: LongInt; - AFRToggle: Boolean; const cStereo_Sky = 0.0500; cStereo_Horizon = 0.0250; @@ -108,11 +107,10 @@ AMTypeMaskX = $00000001; AMTypeMaskY = $00000002; AMTypeMaskAlpha = $00000004; - AMTypeMaskSlide = $00000008; + //AMTypeMaskSlide = $00000008; {$IFDEF MOBILE} AMSlotSize = 48; - AMTITLE = 30; {$ELSE} AMSlotSize = 32; {$ENDIF} @@ -227,6 +225,8 @@ uCursor.init(); prevPoint.X:= 0; prevPoint.Y:= cScreenHeight div 2; +prevTargetPoint.X:= 0; +prevTargetPoint.Y:= 0; WorldDx:= -(LAND_WIDTH div 2) + cScreenWidth div 2; WorldDy:= -(LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); @@ -646,6 +646,7 @@ AMShiftX:= AMShiftTargetX; AMShiftY:= AMShiftTargetY; prevPoint:= CursorPoint; + prevTargetPoint:= TargetCursorPoint; AMState:= AMHidden; end; end; @@ -1017,15 +1018,6 @@ DrawWorldStereo(Lag, rmDefault) end {$IFDEF USE_S3D_RENDERING} - else if (cStereoMode = smAFR) then - begin - AFRToggle:= (not AFRToggle); - glClear(GL_COLOR_BUFFER_BIT); - if AFRToggle then - DrawWorldStereo(Lag, rmLeftEye) - else - DrawWorldStereo(Lag, rmRightEye) - end else if (cStereoMode = smHorizontal) or (cStereoMode = smVertical) then begin // create left fb @@ -1708,6 +1700,7 @@ begin if (not bShowAmmoMenu) then begin + if not CurrentTeam^.ExtDriven then TargetCursorPoint:= CursorPoint; with CurrentHedgehog^ do if (Gear <> nil) and ((Gear^.State and gstHHChooseTarget) <> 0) then begin @@ -1716,9 +1709,9 @@ i:= GetCurAmmoEntry(CurrentHedgehog^)^.Pos; with Ammoz[CurAmmoType] do if PosCount > 1 then - DrawSprite(PosSprite, CursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - CursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i); + DrawSprite(PosSprite, TargetCursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - TargetCursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i); end; - DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8) + DrawSprite(sprArrow, TargetCursorPoint.X, cScreenHeight - TargetCursorPoint.Y, (RealTicks shr 6) mod 8) end end; @@ -1731,7 +1724,7 @@ var EdgesDist, wdy, shs,z, amNumOffsetX, amNumOffsetY: LongInt; begin {$IFNDEF MOBILE} -if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu))) and cHasFocus and (GameState <> gsConfirm) then +if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu) and autoCameraOn)) and cHasFocus and (GameState <> gsConfirm) then uCursor.updatePosition(); {$ENDIF} z:= round(200/zoom); @@ -1802,7 +1795,8 @@ EdgesDist:= cGearScrEdgesDist; // this generates the border around the screen that moves the camera when cursor is near it -if isCursorVisible or ((FollowGear <> nil) and autoCameraOn) then +if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or + (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then begin if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then begin