hedgewars/uVariables.pas
changeset 14682 93429d8f6b3f
parent 14675 56831f466d1d
child 14684 4eaeba349179
--- a/hedgewars/uVariables.pas	Tue Feb 05 01:40:16 2019 +0300
+++ b/hedgewars/uVariables.pas	Tue Feb 05 02:13:04 2019 +0100
@@ -133,8 +133,9 @@
 
     cTagsMask        : byte;
     cPrevTagsMask    : byte;
-    zoom             : GLfloat;
-    ZoomValue        : GLfloat;
+    zoom             : GLfloat; // current zoom
+    ZoomValue        : GLfloat; // aimed zoom
+    UserZoom         : GLfloat; // user-chosen initial and default zoom
 
     cWaterLine       : LongInt;
     cGearScrEdgesDist: LongInt;
@@ -168,6 +169,7 @@
 
     cCaseFactor     : Longword;
     cMaxCaseDrops   : Longword; // Max. number of crates which can be in the game when dropping
+
     cLandMines      : Longword;
     cAirMines       : Longword;
     cExplosives     : Longword;
@@ -2624,6 +2626,20 @@
     cScriptParam    := '';
     cTestLua        := False;
 
+    UserZoom        := cDefaultZoomLevel;
+    zoom            := cDefaultZoomLevel;
+    ZoomValue       := cDefaultZoomLevel;
+
+{$IFDEF MOBILE}
+    cMaxZoomLevel:= 0.5;
+    cMinZoomLevel:= 3.5;
+    cZoomDelta:=    0.20;
+{$ELSE}
+    cMaxZoomLevel:= 1.0;
+    cMinZoomLevel:= 3.0;
+    cZoomDelta:=    0.25;
+{$ENDIF}
+
 {$IFDEF USE_VIDEO_RECORDING}
     RecPrefix          := '';
     cAVFormat          := '';
@@ -2777,16 +2793,6 @@
     cDamageModifier         := _1;
     TargetPoint             := cTargetPointRef;
 
-{$IFDEF MOBILE}
-    cMaxZoomLevel:= 0.5;
-    cMinZoomLevel:= 3.5;
-    cZoomDelta:= 0.20;
-{$ELSE}
-    cMaxZoomLevel:= 1.0;
-    cMinZoomLevel:= 3.0;
-    cZoomDelta:= 0.25;
-    {$ENDIF}
-
     aVertex:= 0;
     aTexCoord:= 1;
     aColor:= 2;
@@ -2844,8 +2850,6 @@
     cExplosives     := 2;
 
     GameState       := Low(TGameState);
-    zoom            := cDefaultZoomLevel;
-    ZoomValue       := cDefaultZoomLevel;
     WeaponTooltipTex:= nil;
     cLaserSighting  := false;
     cLaserSightingSniper := false;