Make nearby more accurate to public server.

This commit is contained in:
SilicaAndPina 2021-02-11 11:34:47 +13:00
parent 9f592fb51b
commit 9f3ebaa256
8 changed files with 34 additions and 14 deletions

View file

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HISP.Server
{
@ -34,6 +31,11 @@ namespace HISP.Server
return arr;
}
public static Double PointsToDistance(int x1, int y1, int x2, int y2)
{
return Math.Sqrt(Math.Pow(x1 - (-y1), 2) + Math.Pow(x2 - (-y2), 2));
}
public static DateTime UnixTimeStampToDateTime(double unixTimeStamp)
{
// Unix timestamp is seconds past epoch

View file

@ -671,7 +671,7 @@ namespace HISP.Server
Messages.RanchYouCouldPurchaseThisRanch = gameData.messages.meta.ranch.you_could_purchase_this;
Messages.RanchYouAllreadyOwnARanch = gameData.messages.meta.ranch.ranch_already_owned;
Messages.RanchSubscribersOnly = gameData.messages.meta.ranch.sub_only;
Messages.RanchDescriptionOthersFormat = gameData.meta.ranch.ranch_desc_others;
Messages.RanchDescriptionOthersFormat = gameData.messages.meta.ranch.ranch_desc_others;
Messages.RanchUnownedRanchClicked = gameData.messages.meta.ranch.unowned_ranch_click;
Messages.RanchClickMessageFormat = gameData.messages.meta.ranch.click_message;

View file

@ -61,8 +61,6 @@ namespace HISP.Server
Database.IncAllUsersFreeTime(1);
}
if (totalMinutesElapsed % 25 == 0)
{
@ -84,6 +82,11 @@ namespace HISP.Server
}
}
foreach(GameClient client in ConnectedClients)
if (client.LoggedIn)
if (!client.LoggedinUser.MetaPriority)
UpdateArea(client);
Treasure.AddValue();
Database.IncPlayerTirednessForOfflineUsers();
DroppedItems.Update();