Skip to content

Commit

Permalink
Update to 6/16/20 - Build 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tran-Foxxo committed Jun 16, 2020
1 parent 884d4f8 commit d40d863
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Changelogs/6-16-20 - Build 1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog for 6/16/20 - Build 1

* Fixed a issue where the Gravity Well size was not being set when loading a new track.
2 changes: 1 addition & 1 deletion src/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public double GravityWellSize
_track.GravityWellSize = value;
Stop();
Reset();
StandardLine.Zone = value;
StandardLine.Zone = _track.GravityWellSize;
_renderer.RefreshTrack(_track);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/Game/Timeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public void Restart(Rider state, float zoom)
Constants.StaticTriggerLineColorChange = Color.FromArgb(255, _track.LineColorR, _track.LineColorG, _track.LineColorB);
//Set Gravity
RiderConstants.Gravity = new Vector2d(0.175 * _track.XGravity, 0.175 * _track.YGravity); //gravity
//Set Gravity well size
StandardLine.Zone = _track.GravityWellSize;

using (changesync.AcquireWrite())
{
Expand Down
14 changes: 14 additions & 0 deletions src/IO/TRKLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ private static float ParseFloat(string f)
"Unable to parse string into float");
return ret;
}
private static double ParseDouble(string f)
{
if (!double.TryParse(
f,
NumberStyles.Float,
Program.Culture,
out double ret))
throw new TrackIO.TrackLoadException(
"Unable to parse string into double");
return ret;
}
private static int ParseInt(string f)
{
if (!int.TryParse(
Expand Down Expand Up @@ -66,6 +77,9 @@ private static void ParseMetadata(Track ret, BinaryReader br)
case TrackMetadata.xgravity:
ret.XGravity = ParseFloat(metadata[1]);
break;
case TrackMetadata.gravitywellsize:
ret.GravityWellSize = ParseDouble(metadata[1]);
break;
case TrackMetadata.bgcolorR:
ret.BGColorR = ParseInt(metadata[1]);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class Program
#endif
public static string BinariesFolder = "bin";
public readonly static CultureInfo Culture = new CultureInfo("en-US");
public static string Version = "6/15/20 - Build 1";
public static string Version = "6/16/20 - Build 1";
public static string TestVersion = "";
public static string NewVersion = null;
public static readonly string WindowTitle = "Line Rider: Advanced (Tran\'s fork) " + Version + TestVersion;
Expand Down
11 changes: 9 additions & 2 deletions src/UI/Dialogs/ChangelogWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ public ChangelogWindow(GameCanvas parent, Editor editor) : base(parent, editor)
{
Title = "Changelog for " + Program.Version;
AutoSizeToContents = false;
SetSize(1100, 380);

var changelogText = "* Crashes due to invalid settings files are now resolved (again because I did it wrong last update).\n" +
var changelogText = "" +
"6/15/20 - Build 1\n" +
"* Crashes due to invalid settings files are now resolved (again because I did it wrong last update).\n" +
"* Default save format settings are now available for crash backups `Settings -> Other`.\n" +
"* Crash Backups now save in the format `## Crash Backup month.day.year_hours.minutes.filetype`.\n" +
"* Fixed a issue where autosaves and quicksaves were saved as `## XXXXsave_day.month.year_hours.minutes.filetype`, not `## XXXXsave_month.day.year_hours.minutes.filetype`.\n" +
Expand All @@ -32,6 +35,11 @@ public ChangelogWindow(GameCanvas parent, Editor editor) : base(parent, editor)
"--* Also custom Gravity Well sizes will modify the box Bosh uses to check for collisions, use the Debug Grid to see this change. \n" +
"----* The grid is not accurate on the first frame, this is a bug.\n" +
"\n" +
"================================================================================================================================\n" +
"\n" +
"6/16/20 - Build 1\n"+
"* Fixed a issue where the Gravity Well size was not being set when loading a new track.\n" +
"\n" +
"NOTE: Discord is *still* auto disabled on startup for now until I reimplement it in a more stable way.";

ControlBase bottomcontainer = new ControlBase(this)
Expand Down Expand Up @@ -109,7 +117,6 @@ public ChangelogWindow(GameCanvas parent, Editor editor) : base(parent, editor)
l.AddText(changelogText, Skin.Colors.Text.Foreground);
MakeModal(true);
DisableResizing();
SetSize(1100, 300);
}

private void CreateLabeledControl(ControlBase parent, string label, ControlBase control)
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6/15/20 - Build 1
6/16/20 - Build 1

0 comments on commit d40d863

Please sign in to comment.