Compare commits

...

2 Commits

Author SHA1 Message Date
dda988db17 Quick bugfix 2020-11-29 16:31:41 -08:00
e56278c6cb Fix stock flags being stretched 2020-11-29 16:02:45 -08:00
7 changed files with 18 additions and 10 deletions

View File

@ -6,8 +6,8 @@
{
"MAJOR":0,
"MINOR":2,
"PATCH":5,
"BUILD":0
"PATCH":6,
"BUILD":1
},
"KSP_VERSION":
{

View File

@ -1,4 +1,4 @@
# Conformal Decals v0.2.5
# Conformal Decals v0.2.6
[![Build Status](https://travis-ci.org/drewcassidy/KSP-Conformal-Decals.svg?branch=release)](https://travis-ci.org/drewcassidy/KSP-Conformal-Decals) [![Art: CC BY-SA 4.0](https://img.shields.io/badge/Art%20License-CC%20BY--SA%204.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/) [![Code: GPL v3](https://img.shields.io/badge/Code%20License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
![Screenshot](http://pileof.rocks/KSP/images/ConformalDecalsHeader.png)

View File

@ -41,7 +41,13 @@ namespace ConformalDecals.MaterialProperties {
public Vector2 Dimensions => new Vector2(_texture.width, _texture.height);
public Vector2 MaskedDimensions => _hasTile ? _tileRect.size : Dimensions;
public float AspectRatio => MaskedHeight / (float) MaskedWidth;
public float AspectRatio {
get {
if (_texture == null) return 1;
if (_textureUrl?.Contains("Squad/Flags") == true) return 0.625f;
return MaskedHeight / (float) MaskedWidth;
}
}
public override void ParseNode(ConfigNode node) {
base.ParseNode(node);

View File

@ -400,7 +400,7 @@ namespace ConformalDecals {
protected void UpdateScale() {
scale = Mathf.Max(0.01f, scale);
depth = Mathf.Max(0.01f, depth);
var aspectRatio = materialProperties.AspectRatio;
var aspectRatio = Mathf.Max(0.01f, materialProperties.AspectRatio);
Vector2 size;
switch (scaleMode) {

View File

@ -1,5 +1 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: KSPAssembly("ConformalDecals", 0, 1, 0)]
[assembly: KSPAssembly("ConformalDecals", 0, 2, 6)]

View File

@ -1,3 +1,9 @@
v0.2.6
------
- Fixes:
- Fixed stock flags appearing stretched by forcing their aspect ratio to be correct.
- Another attempted fix for the planet text glitch.
v0.2.5
------
- Fixes: