Skip to content

Commit

Permalink
-update for latest version of seserverextender
Browse files Browse the repository at this point in the history
  • Loading branch information
DraygoKorvan committed Aug 7, 2014
1 parent 9e8faf2 commit 75b0c77
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,18 @@ private void mainloop()
{
Thread.Sleep(resolution);
m_asteroids.Clear();
List<VoxelMap> asteroids = SectorObjectManager.Instance.GetTypedInternalData<VoxelMap>();
foreach (VoxelMap voxelmap in asteroids)
while (m_asteroids.Count == 0 && m_running)
{
if (!voxelmap.Filename.Contains("moon"))
List<VoxelMap> asteroids = SectorObjectManager.Instance.GetTypedInternalData<VoxelMap>();
foreach (VoxelMap voxelmap in asteroids)
{
//ignore moons
m_asteroids.Add(new SeDropshipAsteroids(voxelmap));
if (!voxelmap.Filename.Contains("moon"))
{
//ignore moons
m_asteroids.Add(new SeDropshipAsteroids(voxelmap));
}
}
Thread.Sleep(resolution);
}
List<CubeGridEntity> ignore = SectorObjectManager.Instance.GetTypedInternalData<CubeGridEntity>();
while(m_running)
Expand Down Expand Up @@ -411,9 +415,13 @@ public void doDrop(CubeGridEntity grid, CockpitEntity seat, long Owner)
grid.LinearVelocity = Vector3Intercept;
float timeToSlow = Vector3.Distance(position, Vector3.Subtract(target, Vector3.Multiply(Vector3.Normalize(Vector3Intercept), slowDownDistance+adjust))) / Vector3.Distance(new Vector3Wrapper(0, 0, 0), Vector3Intercept);
float timeToCollision = Vector3.Distance(Vector3.Subtract(target, Vector3.Multiply(Vector3.Normalize(Vector3Intercept), slowDownDistance+adjust)), Vector3.Subtract(target, Vector3.Multiply(Vector3.Normalize(Vector3Intercept), 10))) / slowSpeed;
ChatManager.Instance.SendPrivateChatMessage(steamid, "Estimated travel time: " + ((int)timeToSlow / 60).ToString() + " minutes and " + ((int)timeToSlow % 60).ToString() + " seconds. Enjoy your trip!");
Thread.Sleep((int)timeToSlow * 1000);
if(seat.Pilot != null)
ChatManager.Instance.SendPrivateChatMessage(steamid, "Welcome to your destination, pod will attempt to land. If navigation calculations were off it will automatically stop the pod in " + ((int)timeToCollision).ToString() + " seconds. Have a nice day!");
grid.LinearVelocity = Vector3.Multiply(Vector3.Normalize(Vector3Intercept), slowSpeed);
Thread.Sleep((int)timeToCollision * 1000);

grid.LinearVelocity = new Vector3Wrapper(0, 0, 0);

}
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.2.3.4")]
[assembly: AssemblyFileVersion("0.2.3.4")]
[assembly: AssemblyVersion("0.2.3.8")]
[assembly: AssemblyFileVersion("0.2.3.8")]
Binary file modified SE-Dropship.v12.suo
Binary file not shown.

0 comments on commit 75b0c77

Please sign in to comment.