continue Gangwar System
This commit is contained in:
@@ -723,8 +723,15 @@ namespace ReallifeGamemode.Server.Managers
|
||||
Vector3 lastPosition = v.Position;
|
||||
if (lastPositions.ContainsKey(v.Handle)) lastPosition = lastPositions[v.Handle];
|
||||
lastPositions[v.Handle] = v.Position;
|
||||
|
||||
double distanceDriven = v.HasSharedData("drivenDistance") ? (double)v.GetSharedData("drivenDistance") : 0D;
|
||||
double distanceDriven;
|
||||
try
|
||||
{
|
||||
distanceDriven = v.HasSharedData("drivenDistance") ? (double)v.GetSharedData("drivenDistance") : 0D;
|
||||
}
|
||||
catch(Microsoft.CSharp.RuntimeBinder.RuntimeBinderException ex)
|
||||
{
|
||||
distanceDriven = (double)0;
|
||||
}
|
||||
|
||||
double distance = lastPosition.DistanceTo(v.Position) / 1000.0;
|
||||
if (distance > 0.2) return;
|
||||
|
||||
Reference in New Issue
Block a user