diff --git a/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs b/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs index 3fe1ae557..1353fbcf5 100644 --- a/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs +++ b/Artemis/Artemis/Modules/Games/RocketLeague/RocketLeagueModel.cs @@ -52,6 +52,21 @@ namespace Artemis.Modules.Games.RocketLeague MemoryHelpers.GetPointers(); _pointer = JsonConvert.DeserializeObject(Offsets.Default.RocketLeague); + //var test = + // JsonConvert.SerializeObject(new List + // { + // new GamePointersCollectionModel + // { + // Game = "RocketLeague", + // GameVersion = "1.12", + // GameAddresses = new List {new GamePointer + // { + // Description = "Boost", + // BasePointer = new IntPtr(0x01581AF4), + // Offsets = new []{0xB4, 0x104, 0x320, 0x708, 0x21C} + // }} + // } + // }); var tempProcess = MemoryHelpers.GetProcessIfRunning(ProcessName); _memory = new Memory(tempProcess); } @@ -120,6 +135,8 @@ namespace Artemis.Modules.Games.RocketLeague public override Bitmap GenerateBitmap() { var bitmap = MainModel.ActiveKeyboard.KeyboardBitmap(Scale); + if (_boostRect == null) + return null; using (var g = Graphics.FromImage(bitmap)) { diff --git a/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs b/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs index f51392380..0fb6d7b97 100644 --- a/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs +++ b/Artemis/Artemis/Utilities/Memory/MemoryHelpers.cs @@ -52,12 +52,12 @@ namespace Artemis.Utilities.Memory try { var jsonClient = new WebClient(); - var json = jsonClient - .DownloadString("https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json"); + // Random number to get around cache issues + var rand = new Random(DateTime.Now.Millisecond); + var json = jsonClient.DownloadString("https://raw.githubusercontent.com/SpoinkyNL/Artemis/master/pointers.json?random=" + rand.Next()); // Get a list of pointers var pointers = JsonConvert.DeserializeObject>(json); - // Assign each pointer to the settings file var rlPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "RocketLeague")); if (rlPointers != null) @@ -65,13 +65,6 @@ namespace Artemis.Utilities.Memory Offsets.Default.RocketLeague = rlPointers; Offsets.Default.Save(); } - - var witcherPointers = JsonConvert.SerializeObject(pointers.FirstOrDefault(p => p.Game == "Witcher3")); - if (witcherPointers != null) - { - Offsets.Default.Witcher3 = witcherPointers; - Offsets.Default.Save(); - } } catch (Exception) {