Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
Mac_Slash
2020-05-04 03:14:16 +02:00
2 changed files with 4 additions and 1 deletions

View File

@@ -192,6 +192,7 @@ namespace ReallifeGamemode.Server.Core.Managers
.Include(h => h.Owner)
.Include(h => h.BankAccount)
.Include(h => h.Rentals)
.ToList()
.OrderBy(h => h.Position.DistanceTo(position))
.FirstOrDefault();
}

View File

@@ -27,6 +27,8 @@ namespace ReallifeGamemode.Server.Managers
/// <param name="pos">Die Position der Garage</param>
public static void AddTuningGarage(Vector3 pos)
{
NAPI.Blip.CreateBlip(446, pos, 1f, 4, "Los Santos Customs", shortRange: true);
ColShape colShape = NAPI.ColShape.CreateSphereColShape(pos, 5, 0);
colShape.OnEntityEnterColShape += (cs, c) =>
@@ -35,7 +37,7 @@ namespace ReallifeGamemode.Server.Managers
if (c.IsInVehicle && c.VehicleSeat == 0)
{
Vehicle v = c.Vehicle;
if (v.GetServerVehicle() is FactionVehicle fV && fV.GetOwners().TrueForAll(fV => dbContext.Factions.Where(f => f.Id == fV).First().StateOwned))
if (v.GetServerVehicle() is FactionVehicle fV && fV.GetOwners().Any(fV => dbContext.Factions.Where(f => f.Id == fV && f.StateOwned).Any()))
{
return;
}