vehicle sync OHNE FEHLER

This commit is contained in:
hydrant
2020-05-09 01:41:39 +02:00
parent 93540e721b
commit 2e91fe76ee
12 changed files with 163 additions and 429 deletions

View File

@@ -13,6 +13,7 @@ using System.Linq;
using System.Reflection;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Services;
using ReallifeGamemode.Server.Types;
/**
* @overview Life of German Reallife - Managers InventoryManager (InventoryManager.cs)

View File

@@ -749,6 +749,11 @@ namespace ReallifeGamemode.Server.Managers
{
NAPI.Pools.GetAllVehicles().ForEach(v =>
{
if (v.Handle.Value == 0 || v.Handle == default)
{
return;
}
Vector3 lastPosition = v.Position;
if (lastPositions.ContainsKey(v.Handle)) lastPosition = lastPositions[v.Handle];
lastPositions[v.Handle] = v.Position;