Added safety check for previous DB1 .dbs file compatibility change

This commit is contained in:
codeimp 2009-04-02 08:32:21 +00:00
parent cf7b69c8f6
commit 209c73efa4

View file

@ -68,8 +68,10 @@ namespace CodeImp.DoomBuilder.Windows
// Show background offset
backoffsetx.Value = General.Map.Grid.BackgroundX;
backoffsety.Value = General.Map.Grid.BackgroundY;
backscalex.Value = (int)(General.Map.Grid.BackgroundScaleX * 100.0f);
backscaley.Value = (int)(General.Map.Grid.BackgroundScaleY * 100.0f);
int scalex = (int)(General.Map.Grid.BackgroundScaleX * 100.0f);
int scaley = (int)(General.Map.Grid.BackgroundScaleY * 100.0f);
backscalex.Value = General.Clamp(scalex, (int)backscalex.Minimum, (int)backscalex.Maximum);
backscaley.Value = General.Clamp(scaley, (int)backscaley.Minimum, (int)backscaley.Maximum);
}
// Show Background changed