Fix building snap misaligning view

field item coordinates need to be even, not odd
do the same "even" clamp

(we do this so that we can sync the terrain tile view to the field item view)
This commit is contained in:
Kurt 2020-05-25 08:36:07 -07:00
parent 084542d367
commit 0d64fa65d8

View File

@ -779,7 +779,9 @@ private void LoadIndex(int index)
// -32 for relative offset on map (buildings can be placed on the exterior ocean acres)
// -16 to put it in the center of the view
const int shift = 48;
View.SetViewTo(b.X - shift, b.Y - shift);
var x = (b.X - shift) & 0xFFFE;
var y = (b.Y - shift) & 0xFFFE;
View.SetViewTo(x, y);
}
private void NUD_BuildingType_ValueChanged(object sender, EventArgs e)