Skip to content

Commit

Permalink
Fix continuous resizing of reticle
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Dec 8, 2018
1 parent 2127445 commit 7967ef2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _work/data/Scripts/Content/GFA/_intern/reticle.d
Expand Up @@ -77,10 +77,10 @@ func void GFA_InsertReticle(var int reticlePtr) {
ViewPtr_SetColor(GFA_RETICLE_PTR, reticle.color);
};

var zCView crsHr; crsHr = _^(GFA_RETICLE_PTR);
if (crsHr.vsizex != size) || (Print_Screen[PS_X]/2 != centerX) {
if (csize != size) || (Print_Screen[PS_X]/2 != centerX) {
// Update its size and re-position it to center
Print_GetScreenSize(); // Necessary for Print_ToRatio
var int csize; csize = size;
var int centerX; centerX = Print_Screen[PS_X]/2;
if (GFA_ScaleReticleWithResolution) {
var int sizey; sizey = Print_ToRatio(size, PS_Y);
Expand All @@ -92,6 +92,7 @@ func void GFA_InsertReticle(var int reticlePtr) {
};
};

var zCView crsHr; crsHr = _^(GFA_RETICLE_PTR);
if (!crsHr.isOpen) {
// Show the reticle if it is not visible
ViewPtr_Open(GFA_RETICLE_PTR);
Expand Down

0 comments on commit 7967ef2

Please sign in to comment.