Fixes when getting on some transports the npcs around you would disappear, and sometimes you would die from fall damage.
This commit is contained in:
@@ -216,8 +216,8 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
public float GetExactDist2dSq(Position pos)
|
public float GetExactDist2dSq(Position pos)
|
||||||
{
|
{
|
||||||
float dx = posX - pos.posX;
|
float dx = pos.posX - posX;
|
||||||
float dy = posY - pos.posY;
|
float dy = pos.posY - posY;
|
||||||
|
|
||||||
return dx * dx + dy * dy;
|
return dx * dx + dy * dy;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,10 +315,7 @@ namespace Game.Maps
|
|||||||
totalTime += leg.Segments[pauseItr].SegmentEndArrivalTimestamp + leg.Segments[pauseItr].Delay;
|
totalTime += leg.Segments[pauseItr].SegmentEndArrivalTimestamp + leg.Segments[pauseItr].Delay;
|
||||||
|
|
||||||
for (var i = 0; i < leg.Segments.Count; ++i)
|
for (var i = 0; i < leg.Segments.Count; ++i)
|
||||||
{
|
leg.Segments[i].SegmentEndArrivalTimestamp += leg.StartTimestamp;
|
||||||
var segment = leg.Segments[i];
|
|
||||||
segment.SegmentEndArrivalTimestamp += leg.StartTimestamp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneratePath(GameObjectTemplate goInfo, TransportTemplate transport)
|
void GeneratePath(GameObjectTemplate goInfo, TransportTemplate transport)
|
||||||
@@ -506,7 +503,7 @@ namespace Game.Maps
|
|||||||
Dictionary<ulong, TransportSpawn> _transportSpawns = new();
|
Dictionary<ulong, TransportSpawn> _transportSpawns = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct TransportPathSegment
|
public class TransportPathSegment
|
||||||
{
|
{
|
||||||
public uint SegmentEndArrivalTimestamp;
|
public uint SegmentEndArrivalTimestamp;
|
||||||
public uint Delay;
|
public uint Delay;
|
||||||
|
|||||||
Reference in New Issue
Block a user