Decrease range needed for coppers to get criminals binned after death.

From 200 to 100.
This commit is contained in:
2021-04-21 21:42:34 +02:00
parent ddb52fe9b6
commit 3f417e6681

View File

@@ -27,7 +27,6 @@ namespace ReallifeGamemode.Server.Events
{ {
private readonly Dictionary<Player, DateTime> lastPlayerDeathTime = new Dictionary<Player, DateTime>(); private readonly Dictionary<Player, DateTime> lastPlayerDeathTime = new Dictionary<Player, DateTime>();
[ServerEvent(Event.PlayerDeath)] [ServerEvent(Event.PlayerDeath)]
public void OnPlayerDeath(Player player, Player killer, uint reason) public void OnPlayerDeath(Player player, Player killer, uint reason)
{ {
@@ -114,9 +113,9 @@ namespace ReallifeGamemode.Server.Events
}; };
dbContext.DeathLogs.Add(dead); dbContext.DeathLogs.Add(dead);
bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 200 * 200); bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 100 * 100);
if (user.Wanteds > 0) if (user.Wanteds > 0 && player.HasData("GotInsideOfTurf") && !player.GetData<bool>("GotInsideOfTurf"))
{ {
if (copNearby) if (copNearby)
{ {