aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorUbitUmarov2017-07-25 03:13:03 +0100
committerUbitUmarov2017-07-25 03:13:03 +0100
commit86c9c86eebdad234520461f61f925eb60f965312 (patch)
tree3d679d47c6b02074fb59f314d69a74778468f16a /OpenSim/Region/CoreModules/World
parentOoops.. pay to land owner, not grid. group owned parcel not suported for now.... (diff)
downloadopensim-SC-86c9c86eebdad234520461f61f925eb60f965312.zip
opensim-SC-86c9c86eebdad234520461f61f925eb60f965312.tar.gz
opensim-SC-86c9c86eebdad234520461f61f925eb60f965312.tar.bz2
opensim-SC-86c9c86eebdad234520461f61f925eb60f965312.tar.xz
allow pass recharge with no loss of current time up to 1/4 of parcel pass time.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs18
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 {