From bf21c299dbda9bebb227685848b705891a3ef932 Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:31:38 -0300 Subject: [PATCH] Bump version --- Client/NativeData.cs | 3 +-- Client/PedThread.cs | 1 - Client/PlayerList.cs | 7 +------ Client/Program.cs | 5 ----- Client/Properties/AssemblyInfo.cs | 7 +++---- Client/SyncPed.cs | 17 ++++++----------- 6 files changed, 11 insertions(+), 29 deletions(-) diff --git a/Client/NativeData.cs b/Client/NativeData.cs index 80ad37d..f49d836 100644 --- a/Client/NativeData.cs +++ b/Client/NativeData.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using ProtoBuf; namespace GTACoOp diff --git a/Client/PedThread.cs b/Client/PedThread.cs index 5ebe46e..794fa0c 100644 --- a/Client/PedThread.cs +++ b/Client/PedThread.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using GTA; -using System.Drawing; namespace GTACoOp { diff --git a/Client/PlayerList.cs b/Client/PlayerList.cs index e8373a2..014f393 100644 --- a/Client/PlayerList.cs +++ b/Client/PlayerList.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using GTA; -using GTA.Math; using GTA.Native; namespace GTACoOp diff --git a/Client/Program.cs b/Client/Program.cs index e8539ff..e5f1f45 100644 --- a/Client/Program.cs +++ b/Client/Program.cs @@ -1,12 +1,7 @@ using System; -using System.Collections.Generic; using System.IO; using System.Threading; -using System.Linq; using System.Runtime.InteropServices; -using System.Xml.Serialization; -using GTA; -using GTA.Native; using Lidgren.Network; using ProtoBuf; diff --git a/Client/Properties/AssemblyInfo.cs b/Client/Properties/AssemblyInfo.cs index 79b6923..fd3de1e 100644 --- a/Client/Properties/AssemblyInfo.cs +++ b/Client/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -10,7 +9,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("GTACoOp")] -[assembly: AssemblyCopyright("Copyright © 2016-2023")] +[assembly: AssemblyCopyright("Copyright © 2016-2024")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.4.6")] -[assembly: AssemblyFileVersion("0.9.4.6")] +[assembly: AssemblyVersion("0.9.4.7")] +[assembly: AssemblyFileVersion("0.9.4.7")] diff --git a/Client/SyncPed.cs b/Client/SyncPed.cs index 256176c..78cc5d0 100644 --- a/Client/SyncPed.cs +++ b/Client/SyncPed.cs @@ -285,20 +285,15 @@ public void DisplayLocally() { if (MainVehicle != null && Util.IsVehicleEmpty(MainVehicle)) { - MainVehicle.Position = MainVehicle.GetOffsetPosition(new Vector3(0, 0, -100)); + MainVehicle.MarkAsNoLongerNeeded(); MainVehicle.Delete(); } - var vehs = World.GetAllVehicles().OrderBy(v => + var model = new Model(VehicleHash); + var veh = World.GetClosestVehicle(Character.Position, 3f, model); + if (veh != null) { - if (v == null) return float.MaxValue; - return (v.Position - Character.Position).Length(); - }).ToList(); - - - if (vehs.Any() && vehs[0].Model.Hash == VehicleHash && vehs[0].IsInRange(gPos, 3f)) - { - MainVehicle = vehs[0]; + MainVehicle = veh; /*if (Game.Player.Character.IsInVehicle(MainVehicle) && VehicleSeat == Util.GetPedSeat(Game.Player.Character)) { @@ -308,7 +303,7 @@ public void DisplayLocally() } else { - MainVehicle = World.CreateVehicle(new Model(VehicleHash), gPos, 0); + MainVehicle = World.CreateVehicle(model, gPos); } if (MainVehicle != null)