diff options
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 377f243..a3146c1 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -579,8 +579,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
579 | return true; | 579 | return true; |
580 | return false; | 580 | return false; |
581 | }); | 581 | }); |
582 | 582 | int now = Util.UnixTimeSinceEpoch(); | |
583 | int expires = Util.UnixTimeSinceEpoch() + (int)(3600.0 * ldata.PassHours); | 583 | int expires = (int)(3600.0 * ldata.PassHours + 0.5f); |
584 | int currenttime = -1; | ||
584 | if (idx != -1) | 585 | if (idx != -1) |
585 | { | 586 | { |
586 | if(ldata.ParcelAccessList[idx].Expires == 0) | 587 | if(ldata.ParcelAccessList[idx].Expires == 0) |
@@ -589,18 +590,17 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
589 | return; | 590 | return; |
590 | } | 591 | } |
591 | 592 | ||
592 | if(expires < land.LandData.ParcelAccessList[idx].Expires - 300f) | 593 | currenttime = ldata.ParcelAccessList[idx].Expires - now; |
593 | { | 594 | if(currenttime > (int)(0.25f * expires + 0.5f)) |
594 | remote_client.SendAgentAlertMessage("Your pass to parcel is still valid for 5 minutes", false); | 595 | currenttime = (int)(0.25f * expires + 0.5f); |
595 | return; | ||
596 | } | ||
597 | } | 596 | } |
598 | 597 | ||
599 | LandAccessEntry entry = new LandAccessEntry(); | 598 | LandAccessEntry entry = new LandAccessEntry(); |
600 | entry.AgentID = targetID; | 599 | entry.AgentID = targetID; |
601 | entry.Flags = AccessList.Access; | 600 | entry.Flags = AccessList.Access; |
602 | entry.Expires = expires; | 601 | entry.Expires = now + expires; |
603 | 602 | if(currenttime > 0) | |
603 | entry.Expires += currenttime; | ||
604 | IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>(); | 604 | IMoneyModule mm = m_scene.RequestModuleInterface<IMoneyModule>(); |
605 | if(cost != 0 && mm != null) | 605 | if(cost != 0 && mm != null) |
606 | { | 606 | { |