From 234d4e11059fb2e1fc9dbe879054bd84e95b502b Mon Sep 17 00:00:00 2001 From: Revolution Date: Wed, 30 Dec 2009 21:45:10 -0600 Subject: [PATCH 01/11] Adds tons of packets. Applied with change: Changed spelling to Summary (from Summery) Signed-off-by: Melanie --- .../Client/MXP/ClientStack/MXPClientView.cs | 31 ++ .../ClientStack/SirikataClientView.cs | 31 ++ .../VWoHTTP/ClientStack/VWHClientView.cs | 31 ++ OpenSim/Framework/IClientAPI.cs | 68 +++ .../ClientStack/LindenUDP/LLClientView.cs | 522 +++++++++++++++++- .../EventQueue/EventQueueGetModule.cs | 5 + .../Framework/EventQueue/EventQueueHelper.cs | 42 ++ .../Examples/SimpleModule/MyNpcCharacter.cs | 32 ++ .../Server/IRCClientView.cs | 31 ++ .../OptionalModules/World/NPC/NPCAvatar.cs | 32 ++ OpenSim/Tests/Common/Mock/TestClient.cs | 32 ++ 11 files changed, 854 insertions(+), 3 deletions(-) diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 0141718d4c..b3582e9ee6 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -756,6 +756,25 @@ namespace OpenSim.Client.MXP.ClientStack public event AvatarNotesUpdate OnAvatarNotesUpdate; public event MuteListRequest OnMuteListRequest; public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; public event PlacesQuery OnPlacesQuery; @@ -1659,5 +1678,17 @@ namespace OpenSim.Client.MXP.ClientStack public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } } } diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index e8d1889451..75b234741c 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs @@ -374,6 +374,25 @@ namespace OpenSim.Client.Sirikata.ClientStack public event GrantUserFriendRights OnGrantUserRights; public event MuteListRequest OnMuteListRequest; public event PlacesQuery OnPlacesQuery; + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; public void SetDebugPacketLevel(int newDebug) { throw new System.NotImplementedException(); @@ -1121,6 +1140,18 @@ namespace OpenSim.Client.Sirikata.ClientStack { throw new System.NotImplementedException(); } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } #endregion } diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 74cecea028..029e23ff54 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -405,6 +405,25 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public event MuteListRequest OnMuteListRequest = delegate { }; public event AvatarInterestUpdate OnAvatarInterestUpdate = delegate { }; public event PlacesQuery OnPlacesQuery = delegate { }; + public event FindAgentUpdate OnFindAgentEvent = delegate { }; + public event TrackAgentUpdate OnTrackAgentEvent = delegate { }; + public event NewUserReport OnUserReportEvent = delegate { }; + public event SaveStateHandler OnSaveStateEvent = delegate { }; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest = delegate { }; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest = delegate { }; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest = delegate { }; + public event FreezeUserUpdate OnParcelFreezeUserEvent = delegate { }; + public event EjectUserUpdate OnParcelEjectUserEvent = delegate { }; + public event ParcelBuyPass OnParcelBuyPass = delegate { }; + public event ParcelGodMark OnParcelGodMark = delegate { }; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest = delegate { }; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest = delegate { }; + public event SimWideDeletesDelegate OnSimWideDeletes = delegate { }; + public event SendPostcard OnSendPostcard = delegate { }; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent = delegate { }; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent = delegate { }; + public event GodlikeMessage onGodlikeMessageEvent = delegate { }; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent = delegate { }; @@ -1165,5 +1184,17 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } } } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index f83fea2d90..bbd9cf1811 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -452,6 +452,47 @@ namespace OpenSim.Framework public delegate void AgentFOV(IClientAPI client, float verticalAngle); public delegate double UpdatePriorityHandler(UpdatePriorityData data); + + public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int Flags,UUID AgentID); + + public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name, UUID AgentID); + + public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); + + public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target); + + public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target); + + public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); + + public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); + + public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string summery, UUID reporter); + + public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); + + public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter); + + public delegate void SaveStateHandler(IClientAPI client,UUID agentID); + + public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID); + + public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID); + + public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID); + + public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + + public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID); + + public delegate void SendPostcard(IClientAPI client); #endregion @@ -1028,6 +1069,26 @@ namespace OpenSim.Framework event PlacesQuery OnPlacesQuery; + event FindAgentUpdate OnFindAgentEvent; + event TrackAgentUpdate OnTrackAgentEvent; + event NewUserReport OnUserReportEvent; + event SaveStateHandler OnSaveStateEvent; + event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + event FreezeUserUpdate OnParcelFreezeUserEvent; + event EjectUserUpdate OnParcelEjectUserEvent; + event ParcelBuyPass OnParcelBuyPass; + event ParcelGodMark OnParcelGodMark; + event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + event SimWideDeletesDelegate OnSimWideDeletes; + event SendPostcard OnSendPostcard; + event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + event MuteListEntryRemove OnRemoveMuteListEntryEvent; + event GodlikeMessage onGodlikeMessageEvent; + event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + /// /// Set the debug level at which packet output should be printed to console. /// @@ -1394,5 +1455,12 @@ namespace OpenSim.Framework void SendRebakeAvatarTextures(UUID textureID); void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages); + + void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt); + + void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier); + + void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); + } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f02c28bebd..a5139c131c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -298,6 +298,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; public event AgentFOV OnAgentFOV; + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + #endregion Events @@ -805,6 +825,189 @@ namespace OpenSim.Region.ClientStack.LindenUDP } OutPacket(gmp, ThrottleOutPacketType.Task); } + + public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary ProposalText) + { + foreach(KeyValuePair Blank in VoteID) + { + GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); + + GAPIRP.AgentData.AgentID = agentID; + GAPIRP.AgentData.GroupID = groupID; + GAPIRP.TransactionData.TransactionID = transactionID; + GAPIRP.TransactionData.TotalNumItems = 1; + GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); + GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; + ProposalData.VoteCast = Utils.StringToBytes("false"); + ProposalData.VoteID = new UUID(VoteID[Blank.Key]); + ProposalData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); + ProposalData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); + ProposalData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); + ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); + ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); + ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); + ProposalData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); + ProposalData.AlreadyVoted = false; + GAPIRP.ProposalData[0] = ProposalData; + OutPacket(GAPIRP, ThrottleOutPacketType.Task); + } + if(VoteID.Count == 0) + { + GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); + + GAPIRP.AgentData.AgentID = agentID; + GAPIRP.AgentData.GroupID = groupID; + GAPIRP.TransactionData.TransactionID = transactionID; + GAPIRP.TransactionData.TotalNumItems = 1; + GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); + GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; + ProposalData.VoteCast = Utils.StringToBytes("false"); + ProposalData.VoteID = UUID.Zero; + ProposalData.VoteInitiator = UUID.Zero; + ProposalData.Majority = 0; + ProposalData.Quorum = 0; + ProposalData.TerseDateID = Utils.StringToBytes(""); + ProposalData.StartDateTime = Utils.StringToBytes(""); + ProposalData.EndDateTime = Utils.StringToBytes(""); + ProposalData.ProposalText = Utils.StringToBytes(""); + ProposalData.AlreadyVoted = false; + GAPIRP.ProposalData[0] = ProposalData; + OutPacket(GAPIRP, ThrottleOutPacketType.Task); + } + } + + public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary VoteType, Dictionary VoteResult, Dictionary ProposalText) + { + foreach(KeyValuePair Blank in VoteID) + { + GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + + GVHIRP.AgentData.AgentID = agentID; + GVHIRP.AgentData.GroupID = groupID; + GVHIRP.TransactionData.TransactionID = transactionID; + GVHIRP.TransactionData.TotalNumItems = 1; + GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[Blank.Key]); + GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); + GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); + GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[Blank.Key]); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[Blank.Key]); + GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); + GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); + GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; + VoteItem.CandidateID = UUID.Zero; + VoteItem.NumVotes = 0; //TODO: FIX THIS!!! + VoteItem.VoteCast = Utils.StringToBytes("Yes"); + GVHIRP.VoteItem[0] = VoteItem; + OutPacket(GVHIRP, ThrottleOutPacketType.Task); + } + if(VoteID.Count == 0) + { + GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + + GVHIRP.AgentData.AgentID = agentID; + GVHIRP.AgentData.GroupID = groupID; + GVHIRP.TransactionData.TransactionID = transactionID; + GVHIRP.TransactionData.TotalNumItems = 0; + GVHIRP.HistoryItemData.VoteID = UUID.Zero; + GVHIRP.HistoryItemData.VoteInitiator = UUID.Zero; + GVHIRP.HistoryItemData.Majority = 0; + GVHIRP.HistoryItemData.Quorum = 0; + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(""); + GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); + GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; + VoteItem.CandidateID = UUID.Zero; + VoteItem.NumVotes = 0; //TODO: FIX THIS!!! + VoteItem.VoteCast = Utils.StringToBytes("No"); + GVHIRP.VoteItem[0] = VoteItem; + OutPacket(GVHIRP, ThrottleOutPacketType.Task); + } + } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); + GADRP.AgentData = new GroupAccountDetailsReplyPacket.AgentDataBlock(); + GADRP.AgentData.AgentID = sender.AgentId; + GADRP.AgentData.GroupID = groupID; + GADRP.HistoryData = new GroupAccountDetailsReplyPacket.HistoryDataBlock[1]; + GroupAccountDetailsReplyPacket.HistoryDataBlock History = new GroupAccountDetailsReplyPacket.HistoryDataBlock(); + GADRP.MoneyData = new GroupAccountDetailsReplyPacket.MoneyDataBlock(); + GADRP.MoneyData.CurrentInterval = 0; + GADRP.MoneyData.IntervalDays = 7; + GADRP.MoneyData.RequestID = transactionID; + GADRP.MoneyData.StartDate = Utils.StringToBytes(DateTime.Today.ToString()); + History.Amount = amt; + History.Description = Utils.StringToBytes(""); + GADRP.HistoryData[0] = History; + OutPacket(GADRP, ThrottleOutPacketType.Task); + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + GroupAccountSummaryReplyPacket GASRP = + (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( + PacketType.GroupAccountSummaryReply); + + GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock(); + GASRP.AgentData.AgentID = sender.AgentId; + GASRP.AgentData.GroupID = groupID; + GASRP.MoneyData = new GroupAccountSummaryReplyPacket.MoneyDataBlock(); + GASRP.MoneyData.Balance = (int)moneyAmt; + GASRP.MoneyData.TotalCredits = totalTier; + GASRP.MoneyData.TotalDebits = usedTier; + GASRP.MoneyData.StartDate = new byte[1]; + GASRP.MoneyData.CurrentInterval = 1; + GASRP.MoneyData.GroupTaxCurrent = 0; + GASRP.MoneyData.GroupTaxEstimate = 0; + GASRP.MoneyData.IntervalDays = 0; + GASRP.MoneyData.LandTaxCurrent = 0; + GASRP.MoneyData.LandTaxEstimate = 0; + GASRP.MoneyData.LastTaxDate = new byte[1]; + GASRP.MoneyData.LightTaxCurrent = 0; + GASRP.MoneyData.TaxDate = new byte[1]; + GASRP.MoneyData.RequestID = sender.AgentId; + GASRP.MoneyData.ParcelDirFeeEstimate = 0; + GASRP.MoneyData.ParcelDirFeeCurrent = 0; + GASRP.MoneyData.ObjectTaxEstimate = 0; + GASRP.MoneyData.NonExemptMembers = 0; + GASRP.MoneyData.ObjectTaxCurrent = 0; + GASRP.MoneyData.LightTaxEstimate = 0; + OutPacket(GASRP, ThrottleOutPacketType.Task); + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + GroupAccountTransactionsReplyPacket GATRP = + (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( + PacketType.GroupAccountTransactionsReply); + + GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock(); + GATRP.AgentData.AgentID = sender.AgentId; + GATRP.AgentData.GroupID = groupID; + GATRP.MoneyData = new GroupAccountTransactionsReplyPacket.MoneyDataBlock(); + GATRP.MoneyData.CurrentInterval = 0; + GATRP.MoneyData.IntervalDays = 7; + GATRP.MoneyData.RequestID = transactionID; + GATRP.MoneyData.StartDate = Utils.StringToBytes(DateTime.Today.ToString()); + GATRP.HistoryData = new GroupAccountTransactionsReplyPacket.HistoryDataBlock[1]; + GroupAccountTransactionsReplyPacket.HistoryDataBlock History = new GroupAccountTransactionsReplyPacket.HistoryDataBlock(); + History.Amount = 0; + History.Item = Utils.StringToBytes(""); + History.Time = Utils.StringToBytes(""); + History.Type = 0; + History.User = Utils.StringToBytes(""); + GATRP.HistoryData[0] = History; + OutPacket(GATRP, ThrottleOutPacketType.Task); + } /// /// Send the region heightmap to the client @@ -4554,6 +4757,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.AvatarInterestsUpdate, HandleAvatarInterestsUpdate); AddLocalPacketHandler(PacketType.GrantUserRights, HandleGrantUserRights); AddLocalPacketHandler(PacketType.PlacesQuery, HandlePlacesQuery); + AddLocalPacketHandler(PacketType.UpdateMuteListEntry, HandleUpdateMuteListEntry); + AddLocalPacketHandler(PacketType.RemoveMuteListEntry, HandleRemoveMuteListEntry); + AddLocalPacketHandler(PacketType.UserReport, HandleUserReport); + AddLocalPacketHandler(PacketType.FindAgent, HandleFindAgent); + AddLocalPacketHandler(PacketType.TrackAgent, HandleTrackAgent); + AddLocalPacketHandler(PacketType.GodUpdateRegionInfo, HandleGodUpdateRegionInfoUpdate); + AddLocalPacketHandler(PacketType.GodlikeMessage, HandleGodlikeMessage); + AddLocalPacketHandler(PacketType.StateSave, HandleSaveStatePacket); + AddLocalPacketHandler(PacketType.GroupAccountDetailsRequest, HandleGroupAccountDetailsRequest); + AddLocalPacketHandler(PacketType.GroupAccountSummaryRequest, HandleGroupAccountSummaryRequest); + AddLocalPacketHandler(PacketType.GroupAccountTransactionsRequest, HandleGroupTransactionsDetailsRequest); + AddLocalPacketHandler(PacketType.FreezeUser, HandleFreezeUser); + AddLocalPacketHandler(PacketType.EjectUser, HandleEjectUser); + AddLocalPacketHandler(PacketType.ParcelBuyPass, HandleParcelBuyPass); + AddLocalPacketHandler(PacketType.ParcelGodMarkAsContent, HandleParcelGodMarkAsContent); + AddLocalPacketHandler(PacketType.GroupActiveProposalsRequest, HandleGroupActiveProposalsRequest); + AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest); + AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes); + AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard); } #region Packet Handlers @@ -4649,7 +4871,72 @@ namespace OpenSim.Region.ClientStack.LindenUDP return false; } - + + private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) + { + ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = + (ParcelGodMarkAsContentPacket)Packet; + + ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; + if (ParcelGodMarkAsContentHandler != null) + { + ParcelGodMarkAsContentHandler(this, + ParcelGodMarkAsContent.AgentData.AgentID, + ParcelGodMarkAsContent.ParcelData.LocalID); + return true; + } + return false; + } + + private bool HandleFreezeUser(IClientAPI client, Packet Packet) + { + FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; + + FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUserEvent; + if (FreezeUserHandler != null) + { + FreezeUserHandler(this, + FreezeUser.AgentData.AgentID, + FreezeUser.Data.Flags, + FreezeUser.Data.TargetID); + return true; + } + return false; + } + + private bool HandleEjectUser(IClientAPI client, Packet Packet) + { + EjectUserPacket EjectUser = + (EjectUserPacket)Packet; + + EjectUserUpdate EjectUserHandler = OnParcelEjectUserEvent; + if (EjectUserHandler != null) + { + EjectUserHandler(this, + EjectUser.AgentData.AgentID, + EjectUser.Data.Flags, + EjectUser.Data.TargetID); + return true; + } + return false; + } + + private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) + { + ParcelBuyPassPacket ParcelBuyPass = + (ParcelBuyPassPacket)Packet; + + ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; + if (ParcelBuyPassHandler != null) + { + ParcelBuyPassHandler(this, + ParcelBuyPass.AgentData.AgentID, + ParcelBuyPass.ParcelData.LocalID); + return true; + } + return false; + } + private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) { ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; @@ -5015,7 +5302,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + + private bool HandleFindAgent(IClientAPI client, Packet Packet) + { + FindAgentPacket FindAgent = + (FindAgentPacket)Packet; + + FindAgentUpdate FindAgentHandler = OnFindAgentEvent; + if (FindAgentHandler != null) + { + FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey); + return true; + } + return false; + } + + private bool HandleTrackAgent(IClientAPI client, Packet Packet) + { + TrackAgentPacket TrackAgent = + (TrackAgentPacket)Packet; + + TrackAgentUpdate TrackAgentHandler = OnTrackAgentEvent; + if (TrackAgentHandler != null) + { + TrackAgentHandler(this, + TrackAgent.AgentData.AgentID, + TrackAgent.TargetData.PreyID); + return true; + } + return false; + } + private bool HandlerRezObject(IClientAPI sender, Packet Pack) { RezObjectPacket rezPacket = (RezObjectPacket)Pack; @@ -8285,6 +8602,70 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } + + private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) + { + GodUpdateRegionInfoPacket GodUpdateRegionInfo = + (GodUpdateRegionInfoPacket)Packet; + + GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdateEvent; + if (handlerGodUpdateRegionInfo != null) + { + handlerGodUpdateRegionInfo(this, + GodUpdateRegionInfo.RegionInfo.BillableFactor, + GodUpdateRegionInfo.RegionInfo.EstateID, + GodUpdateRegionInfo.RegionInfo.RegionFlags, + GodUpdateRegionInfo.RegionInfo.SimName, + GodUpdateRegionInfo.RegionInfo.RedirectGridX, + GodUpdateRegionInfo.RegionInfo.RedirectGridY); + return true; + } + return false; + } + + private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) + { + SimWideDeletesPacket SimWideDeletesRequest = + (SimWideDeletesPacket)Packet; + SimWideDeletesDelegate handlerSimWideDeletesRequest = OnSimWideDeletes; + if (handlerSimWideDeletesRequest != null) + { + handlerSimWideDeletesRequest(this, SimWideDeletesRequest.AgentData.AgentID,(int)SimWideDeletesRequest.DataBlock.Flags,SimWideDeletesRequest.DataBlock.TargetID); + return true; + } + return false; + } + + private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) + { + GodlikeMessagePacket GodlikeMessage = + (GodlikeMessagePacket)Packet; + + GodlikeMessage handlerGodlikeMessage = onGodlikeMessageEvent; + if (handlerGodlikeMessage != null) + { + handlerGodlikeMessage(this, + GodlikeMessage.MethodData.Invoice, + GodlikeMessage.MethodData.Method, + GodlikeMessage.ParamList[0].Parameter); + return true; + } + return false; + } + + private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) + { + StateSavePacket SaveStateMessage = + (StateSavePacket)Packet; + SaveStateHandler handlerSaveStatePacket = OnSaveStateEvent; + if (handlerSaveStatePacket != null) + { + handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID); + return true; + } + return false; + } + private bool HandleGodKickUser(IClientAPI sender, Packet Pack) { GodKickUserPacket gkupack = (GodKickUserPacket)Pack; @@ -8635,6 +9016,76 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } + + private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) + { + UpdateMuteListEntryPacket UpdateMuteListEntry = + (UpdateMuteListEntryPacket)Packet; + MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntryEvent; + if (handlerUpdateMuteListEntry != null) + { + handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID, + Utils.BytesToString(UpdateMuteListEntry.MuteData.MuteName), + UpdateMuteListEntry.MuteData.MuteType, + UpdateMuteListEntry.AgentData.AgentID); + return true; + } + return false; + } + + private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) + { + RemoveMuteListEntryPacket RemoveMuteListEntry = + (RemoveMuteListEntryPacket)Packet; + MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntryEvent; + if (handlerRemoveMuteListEntry != null) + { + handlerRemoveMuteListEntry(this, + RemoveMuteListEntry.MuteData.MuteID, + Utils.BytesToString(RemoveMuteListEntry.MuteData.MuteName), + RemoveMuteListEntry.AgentData.AgentID); + return true; + } + return false; + } + + private bool HandleUserReport(IClientAPI client, Packet Packet) + { + UserReportPacket UserReport = + (UserReportPacket)Packet; + + NewUserReport handlerUserReport = OnUserReportEvent; + if (handlerUserReport != null) + { + handlerUserReport(this, + Utils.BytesToString(UserReport.ReportData.AbuseRegionName), + UserReport.ReportData.AbuserID, + UserReport.ReportData.Category, + UserReport.ReportData.CheckFlags, + Utils.BytesToString(UserReport.ReportData.Details), + UserReport.ReportData.ObjectID, + UserReport.ReportData.Position, + UserReport.ReportData.ReportType, + UserReport.ReportData.ScreenshotID, + Utils.BytesToString(UserReport.ReportData.Summary), + UserReport.AgentData.AgentID); + return true; + } + return false; + } + + private bool HandleSendPostcard(IClientAPI client, Packet packet) + { + SendPostcardPacket SendPostcard = + (SendPostcardPacket)packet; + SendPostcard handlerSendPostcard = OnSendPostcard; + if (handlerSendPostcard != null) + { + handlerSendPostcard(this); + return true; + } + return false; + } private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack) { @@ -8904,7 +9355,72 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - + + private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) + { + GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = + (GroupVoteHistoryRequestPacket)Packet; + GroupVoteHistoryRequest handlerGroupVoteHistoryRequest = OnGroupVoteHistoryRequest; + if (handlerGroupVoteHistoryRequest != null) + { + handlerGroupVoteHistoryRequest(this, GroupVoteHistoryRequest.AgentData.AgentID,GroupVoteHistoryRequest.AgentData.SessionID,GroupVoteHistoryRequest.GroupData.GroupID,GroupVoteHistoryRequest.TransactionData.TransactionID); + return true; + } + return false; + } + + private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) + { + GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = + (GroupActiveProposalsRequestPacket)Packet; + GroupActiveProposalsRequest handlerGroupActiveProposalsRequest = OnGroupActiveProposalsRequest; + if (handlerGroupActiveProposalsRequest != null) + { + handlerGroupActiveProposalsRequest(this, GroupActiveProposalsRequest.AgentData.AgentID,GroupActiveProposalsRequest.AgentData.SessionID,GroupActiveProposalsRequest.GroupData.GroupID,GroupActiveProposalsRequest.TransactionData.TransactionID); + return true; + } + return false; + } + + private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) + { + GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = + (GroupAccountDetailsRequestPacket)Packet; + GroupAccountDetailsRequest handlerGroupAccountDetailsRequest = OnGroupAccountDetailsRequest; + if (handlerGroupAccountDetailsRequest != null) + { + handlerGroupAccountDetailsRequest(this, GroupAccountDetailsRequest.AgentData.AgentID,GroupAccountDetailsRequest.AgentData.GroupID,GroupAccountDetailsRequest.MoneyData.RequestID,GroupAccountDetailsRequest.AgentData.SessionID); + return true; + } + return false; + } + + private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) + { + GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = + (GroupAccountSummaryRequestPacket)Packet; + GroupAccountSummaryRequest handlerGroupAccountSummaryRequest = OnGroupAccountSummaryRequest; + if (handlerGroupAccountSummaryRequest != null) + { + handlerGroupAccountSummaryRequest(this, GroupAccountSummaryRequest.AgentData.AgentID,GroupAccountSummaryRequest.AgentData.GroupID); + return true; + } + return false; + } + + private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) + { + GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = + (GroupAccountTransactionsRequestPacket)Packet; + GroupAccountTransactionsRequest handlerGroupAccountTransactionsRequest = OnGroupAccountTransactionsRequest; + if (handlerGroupAccountTransactionsRequest != null) + { + handlerGroupAccountTransactionsRequest(this, GroupAccountTransactionsRequest.AgentData.AgentID,GroupAccountTransactionsRequest.AgentData.GroupID,GroupAccountTransactionsRequest.MoneyData.RequestID,GroupAccountTransactionsRequest.AgentData.SessionID); + return true; + } + return false; + } + private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) { GroupTitlesRequestPacket groupTitlesRequest = diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index 1b23d923ff..0c6cb1bdfa 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs @@ -708,5 +708,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue OSD item = EventQueueHelper.GroupMembership(groupUpdate); Enqueue(item, avatarID); } + public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID) + { + OSD item = EventQueueHelper.PlacesQuery(groupUpdate); + Enqueue(item, avatarID); + } } } diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index c50318dc28..67fc8e6c23 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs @@ -454,6 +454,48 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue return groupUpdate; } + + public static OSD PlacesQuery(PlacesReplyPacket PlacesReply) + { + OSDMap placesReply = new OSDMap(); + placesReply.Add("message", OSD.FromString("PlacesReplyMessage")); + + OSDMap body = new OSDMap(); + OSDArray agentData = new OSDArray(); + OSDMap agentDataMap = new OSDMap(); + agentDataMap.Add("AgentID", OSD.FromUUID(PlacesReply.AgentData.AgentID)); + agentDataMap.Add("QueryID", OSD.FromUUID(PlacesReply.AgentData.QueryID)); + agentDataMap.Add("TransactionID", OSD.FromUUID(PlacesReply.TransactionData.TransactionID)); + agentData.Add(agentDataMap); + body.Add("AgentData", agentData); + + OSDArray QueryData = new OSDArray(); + + foreach (PlacesReplyPacket.QueryDataBlock groupDataBlock in PlacesReply.QueryData) + { + OSDMap QueryDataMap = new OSDMap(); + QueryDataMap.Add("ActualArea", OSD.FromInteger(groupDataBlock.ActualArea)); + QueryDataMap.Add("BillableArea", OSD.FromInteger(groupDataBlock.BillableArea)); + QueryDataMap.Add("Description", OSD.FromBinary(groupDataBlock.Desc)); + QueryDataMap.Add("Dwell", OSD.FromInteger((int)groupDataBlock.Dwell)); + QueryDataMap.Add("Flags", OSD.FromString(Convert.ToString(groupDataBlock.Flags))); + QueryDataMap.Add("GlobalX", OSD.FromInteger((int)groupDataBlock.GlobalX)); + QueryDataMap.Add("GlobalY", OSD.FromInteger((int)groupDataBlock.GlobalY)); + QueryDataMap.Add("GlobalZ", OSD.FromInteger((int)groupDataBlock.GlobalZ)); + QueryDataMap.Add("Name", OSD.FromBinary(groupDataBlock.Name)); + QueryDataMap.Add("OwnerID", OSD.FromUUID(groupDataBlock.OwnerID)); + QueryDataMap.Add("SimName", OSD.FromBinary(groupDataBlock.SimName)); + QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); + QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); + QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); + + QueryData.Add(QueryDataMap); + } + body.Add("QueryData", QueryData); + placesReply.Add("QueryData[]", body); + + return placesReply; + } } } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 89e77473c3..086103b9be 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -273,6 +273,26 @@ namespace OpenSim.Region.Examples.SimpleModule public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; + + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 @@ -1103,5 +1123,17 @@ namespace OpenSim.Region.Examples.SimpleModule public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } } } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 8b34396a82..6c2b94a7b5 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -836,6 +836,25 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event MuteListRequest OnMuteListRequest; public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 @@ -1628,5 +1647,17 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 1573c7349e..da7f018e4a 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -379,6 +379,26 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; + + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 @@ -1108,5 +1128,17 @@ namespace OpenSim.Region.OptionalModules.World.NPC public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } } } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 6265ab736d..8da9209b89 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -287,6 +287,26 @@ namespace OpenSim.Tests.Common.Mock public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; + + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 @@ -1163,5 +1183,17 @@ namespace OpenSim.Tests.Common.Mock public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + { + } + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + { + } + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) + { + } } } From 8ca37dbefadc9b2d31b76786051d0ed8e1342121 Mon Sep 17 00:00:00 2001 From: Revolution Date: Wed, 30 Dec 2009 22:00:58 -0600 Subject: [PATCH 02/11] Adds Friend Finding functionality. Signed-off-by: Melanie --- .../Avatar/Friends/FriendsModule.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index d6a82efe85..580e06f516 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -395,7 +395,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends // if it leaves, we want to know, too client.OnLogout += OnLogout; + client.OnGrantUserRights += GrantUserFriendRights; + client.OnTrackAgentEvent += FindAgent; + client.OnFindAgentEvent += FindAgent; } @@ -1114,6 +1117,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends { ((Scene)remoteClient.Scene).CommsManager.UpdateUserFriendPerms(requester, target, (uint)rights); } + public void FindAgent(IClientAPI remoteClient, UUID hunter, UUID target) + { + List friendList = GetUserFriends(hunter); + foreach (FriendListItem item in friendList) + { + if(item.onlinestatus == true) + { + if(item.Friend == target && (item.FriendPerms & (uint)FriendRights.CanSeeOnMap) != 0) + { + ScenePresence SPTarget = ((Scene)remoteClient.Scene).GetScenePresence(target); + string regionname = SPTarget.Scene.RegionInfo.RegionName; + remoteClient.SendScriptTeleportRequest("FindAgent", regionname,new Vector3(SPTarget.AbsolutePosition),new Vector3(SPTarget.Lookat)); + } + } + else + { + remoteClient.SendAgentAlertMessage("The agent you are looking for is not online.", false); + } + } + } public List GetUserFriends(UUID agentID) { From 004c751a1b03e5b4635aef153c6b440ef5755739 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 31 Dec 2009 21:36:04 +0000 Subject: [PATCH 03/11] Whitespace cleanup (changed hard tabs to 4 spaces) --- OpenSim/Framework/IClientAPI.cs | 122 +-- .../ClientStack/LindenUDP/LLClientView.cs | 846 +++++++++--------- 2 files changed, 484 insertions(+), 484 deletions(-) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index bbd9cf1811..9f2a0ae668 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -455,44 +455,44 @@ namespace OpenSim.Framework public delegate void MuteListEntryUpdate(IClientAPI client, UUID MuteID, string Name, int Flags,UUID AgentID); - public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name, UUID AgentID); - - public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); - - public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target); - - public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target); - - public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); - - public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); - - public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string summery, UUID reporter); - - public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); - - public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter); - - public delegate void SaveStateHandler(IClientAPI client,UUID agentID); - - public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID); - - public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); - - public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); - - public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID); - - public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID); - - public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); - - public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); - - - public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID); - - public delegate void SendPostcard(IClientAPI client); + public delegate void MuteListEntryRemove(IClientAPI client, UUID MuteID, string Name, UUID AgentID); + + public delegate void AvatarInterestReply(IClientAPI client,UUID target, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); + + public delegate void FindAgentUpdate(IClientAPI client, UUID hunter, UUID target); + + public delegate void TrackAgentUpdate(IClientAPI client, UUID hunter, UUID target); + + public delegate void FreezeUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); + + public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); + + public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string summery, UUID reporter); + + public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); + + public delegate void GodlikeMessage(IClientAPI client, UUID requester, byte[] Method, byte[] Parameter); + + public delegate void SaveStateHandler(IClientAPI client,UUID agentID); + + public delegate void GroupAccountSummaryRequest(IClientAPI client,UUID agentID, UUID groupID); + + public delegate void GroupAccountDetailsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + public delegate void GroupAccountTransactionsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + public delegate void ParcelBuyPass(IClientAPI client, UUID agentID, int ParcelLocalID); + + public delegate void ParcelGodMark(IClientAPI client, UUID agentID, int ParcelLocalID); + + public delegate void GroupActiveProposalsRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + public delegate void GroupVoteHistoryRequest(IClientAPI client,UUID agentID, UUID groupID, UUID transactionID, UUID sessionID); + + + public delegate void SimWideDeletesDelegate(IClientAPI client,UUID agentID, int flags, UUID targetID); + + public delegate void SendPostcard(IClientAPI client); #endregion @@ -1070,24 +1070,24 @@ namespace OpenSim.Framework event PlacesQuery OnPlacesQuery; event FindAgentUpdate OnFindAgentEvent; - event TrackAgentUpdate OnTrackAgentEvent; - event NewUserReport OnUserReportEvent; - event SaveStateHandler OnSaveStateEvent; - event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - event FreezeUserUpdate OnParcelFreezeUserEvent; - event EjectUserUpdate OnParcelEjectUserEvent; - event ParcelBuyPass OnParcelBuyPass; - event ParcelGodMark OnParcelGodMark; - event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - event SimWideDeletesDelegate OnSimWideDeletes; - event SendPostcard OnSendPostcard; - event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - event MuteListEntryRemove OnRemoveMuteListEntryEvent; - event GodlikeMessage onGodlikeMessageEvent; - event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + event TrackAgentUpdate OnTrackAgentEvent; + event NewUserReport OnUserReportEvent; + event SaveStateHandler OnSaveStateEvent; + event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + event FreezeUserUpdate OnParcelFreezeUserEvent; + event EjectUserUpdate OnParcelEjectUserEvent; + event ParcelBuyPass OnParcelBuyPass; + event ParcelGodMark OnParcelGodMark; + event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + event SimWideDeletesDelegate OnSimWideDeletes; + event SendPostcard OnSendPostcard; + event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + event MuteListEntryRemove OnRemoveMuteListEntryEvent; + event GodlikeMessage onGodlikeMessageEvent; + event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; /// /// Set the debug level at which packet output should be printed to console. @@ -1455,12 +1455,12 @@ namespace OpenSim.Framework void SendRebakeAvatarTextures(UUID textureID); void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages); - + void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt); - void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier); - - void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); - + void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier); + + void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt); + } } diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a5139c131c..0ec2ed56f9 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -299,25 +299,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event PlacesQuery OnPlacesQuery; public event AgentFOV OnAgentFOV; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; - + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + #endregion Events @@ -826,113 +826,113 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(gmp, ThrottleOutPacketType.Task); } - public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary ProposalText) - { - foreach(KeyValuePair Blank in VoteID) - { - GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - - GAPIRP.AgentData.AgentID = agentID; - GAPIRP.AgentData.GroupID = groupID; - GAPIRP.TransactionData.TransactionID = transactionID; - GAPIRP.TransactionData.TotalNumItems = 1; - GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); - GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; - ProposalData.VoteCast = Utils.StringToBytes("false"); - ProposalData.VoteID = new UUID(VoteID[Blank.Key]); - ProposalData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); - ProposalData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); - ProposalData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); - ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); - ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); - ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); - ProposalData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); - ProposalData.AlreadyVoted = false; - GAPIRP.ProposalData[0] = ProposalData; - OutPacket(GAPIRP, ThrottleOutPacketType.Task); - } - if(VoteID.Count == 0) - { - GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - - GAPIRP.AgentData.AgentID = agentID; - GAPIRP.AgentData.GroupID = groupID; - GAPIRP.TransactionData.TransactionID = transactionID; - GAPIRP.TransactionData.TotalNumItems = 1; - GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); - GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; - ProposalData.VoteCast = Utils.StringToBytes("false"); - ProposalData.VoteID = UUID.Zero; - ProposalData.VoteInitiator = UUID.Zero; - ProposalData.Majority = 0; - ProposalData.Quorum = 0; - ProposalData.TerseDateID = Utils.StringToBytes(""); - ProposalData.StartDateTime = Utils.StringToBytes(""); - ProposalData.EndDateTime = Utils.StringToBytes(""); - ProposalData.ProposalText = Utils.StringToBytes(""); - ProposalData.AlreadyVoted = false; - GAPIRP.ProposalData[0] = ProposalData; - OutPacket(GAPIRP, ThrottleOutPacketType.Task); - } - } - - public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary VoteType, Dictionary VoteResult, Dictionary ProposalText) - { - foreach(KeyValuePair Blank in VoteID) - { - GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - - GVHIRP.AgentData.AgentID = agentID; - GVHIRP.AgentData.GroupID = groupID; - GVHIRP.TransactionData.TransactionID = transactionID; - GVHIRP.TransactionData.TotalNumItems = 1; - GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[Blank.Key]); - GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); - GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); - GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); - GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); - GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); - GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); - GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[Blank.Key]); - GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[Blank.Key]); - GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); - GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); - GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; + public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary ProposalText) + { + foreach(KeyValuePair Blank in VoteID) + { + GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); + + GAPIRP.AgentData.AgentID = agentID; + GAPIRP.AgentData.GroupID = groupID; + GAPIRP.TransactionData.TransactionID = transactionID; + GAPIRP.TransactionData.TotalNumItems = 1; + GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); + GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; + ProposalData.VoteCast = Utils.StringToBytes("false"); + ProposalData.VoteID = new UUID(VoteID[Blank.Key]); + ProposalData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); + ProposalData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); + ProposalData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); + ProposalData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); + ProposalData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); + ProposalData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); + ProposalData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); + ProposalData.AlreadyVoted = false; + GAPIRP.ProposalData[0] = ProposalData; + OutPacket(GAPIRP, ThrottleOutPacketType.Task); + } + if(VoteID.Count == 0) + { + GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); + + GAPIRP.AgentData.AgentID = agentID; + GAPIRP.AgentData.GroupID = groupID; + GAPIRP.TransactionData.TransactionID = transactionID; + GAPIRP.TransactionData.TotalNumItems = 1; + GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); + GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; + ProposalData.VoteCast = Utils.StringToBytes("false"); + ProposalData.VoteID = UUID.Zero; + ProposalData.VoteInitiator = UUID.Zero; + ProposalData.Majority = 0; + ProposalData.Quorum = 0; + ProposalData.TerseDateID = Utils.StringToBytes(""); + ProposalData.StartDateTime = Utils.StringToBytes(""); + ProposalData.EndDateTime = Utils.StringToBytes(""); + ProposalData.ProposalText = Utils.StringToBytes(""); + ProposalData.AlreadyVoted = false; + GAPIRP.ProposalData[0] = ProposalData; + OutPacket(GAPIRP, ThrottleOutPacketType.Task); + } + } + + public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary VoteType, Dictionary VoteResult, Dictionary ProposalText) + { + foreach(KeyValuePair Blank in VoteID) + { + GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + + GVHIRP.AgentData.AgentID = agentID; + GVHIRP.AgentData.GroupID = groupID; + GVHIRP.TransactionData.TransactionID = transactionID; + GVHIRP.TransactionData.TotalNumItems = 1; + GVHIRP.HistoryItemData.VoteID = new UUID(VoteID[Blank.Key]); + GVHIRP.HistoryItemData.VoteInitiator = new UUID(VoteInitiator[Blank.Key]); + GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Majority[Blank.Key]); + GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Quorum[Blank.Key]); + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(TerseDateID[Blank.Key]); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(StartDateTime[Blank.Key]); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(EndDateTime[Blank.Key]); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(VoteType[Blank.Key]); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(VoteResult[Blank.Key]); + GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(ProposalText[Blank.Key]); + GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); + GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; VoteItem.CandidateID = UUID.Zero; VoteItem.NumVotes = 0; //TODO: FIX THIS!!! VoteItem.VoteCast = Utils.StringToBytes("Yes"); GVHIRP.VoteItem[0] = VoteItem; OutPacket(GVHIRP, ThrottleOutPacketType.Task); - } - if(VoteID.Count == 0) - { - GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - - GVHIRP.AgentData.AgentID = agentID; - GVHIRP.AgentData.GroupID = groupID; - GVHIRP.TransactionData.TransactionID = transactionID; - GVHIRP.TransactionData.TotalNumItems = 0; - GVHIRP.HistoryItemData.VoteID = UUID.Zero; - GVHIRP.HistoryItemData.VoteInitiator = UUID.Zero; - GVHIRP.HistoryItemData.Majority = 0; - GVHIRP.HistoryItemData.Quorum = 0; - GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(""); - GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(""); - GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(""); - GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(""); - GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(""); - GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(""); - GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); - GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; - VoteItem.CandidateID = UUID.Zero; - VoteItem.NumVotes = 0; //TODO: FIX THIS!!! - VoteItem.VoteCast = Utils.StringToBytes("No"); - GVHIRP.VoteItem[0] = VoteItem; - OutPacket(GVHIRP, ThrottleOutPacketType.Task); - } - } - - public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + } + if(VoteID.Count == 0) + { + GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); + + GVHIRP.AgentData.AgentID = agentID; + GVHIRP.AgentData.GroupID = groupID; + GVHIRP.TransactionData.TransactionID = transactionID; + GVHIRP.TransactionData.TotalNumItems = 0; + GVHIRP.HistoryItemData.VoteID = UUID.Zero; + GVHIRP.HistoryItemData.VoteInitiator = UUID.Zero; + GVHIRP.HistoryItemData.Majority = 0; + GVHIRP.HistoryItemData.Quorum = 0; + GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(""); + GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(""); + GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); + GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; + VoteItem.CandidateID = UUID.Zero; + VoteItem.NumVotes = 0; //TODO: FIX THIS!!! + VoteItem.VoteCast = Utils.StringToBytes("No"); + GVHIRP.VoteItem[0] = VoteItem; + OutPacket(GVHIRP, ThrottleOutPacketType.Task); + } + } + + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); GADRP.AgentData = new GroupAccountDetailsReplyPacket.AgentDataBlock(); @@ -950,10 +950,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP GADRP.HistoryData[0] = History; OutPacket(GADRP, ThrottleOutPacketType.Task); } - - public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) + + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) { - GroupAccountSummaryReplyPacket GASRP = + GroupAccountSummaryReplyPacket GASRP = (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( PacketType.GroupAccountSummaryReply); @@ -983,8 +983,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP GASRP.MoneyData.LightTaxEstimate = 0; OutPacket(GASRP, ThrottleOutPacketType.Task); } - - public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) + + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { GroupAccountTransactionsReplyPacket GATRP = (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( @@ -1007,7 +1007,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP History.User = Utils.StringToBytes(""); GATRP.HistoryData[0] = History; OutPacket(GATRP, ThrottleOutPacketType.Task); - } + } /// /// Send the region heightmap to the client @@ -4758,24 +4758,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.GrantUserRights, HandleGrantUserRights); AddLocalPacketHandler(PacketType.PlacesQuery, HandlePlacesQuery); AddLocalPacketHandler(PacketType.UpdateMuteListEntry, HandleUpdateMuteListEntry); - AddLocalPacketHandler(PacketType.RemoveMuteListEntry, HandleRemoveMuteListEntry); - AddLocalPacketHandler(PacketType.UserReport, HandleUserReport); - AddLocalPacketHandler(PacketType.FindAgent, HandleFindAgent); - AddLocalPacketHandler(PacketType.TrackAgent, HandleTrackAgent); - AddLocalPacketHandler(PacketType.GodUpdateRegionInfo, HandleGodUpdateRegionInfoUpdate); - AddLocalPacketHandler(PacketType.GodlikeMessage, HandleGodlikeMessage); - AddLocalPacketHandler(PacketType.StateSave, HandleSaveStatePacket); - AddLocalPacketHandler(PacketType.GroupAccountDetailsRequest, HandleGroupAccountDetailsRequest); - AddLocalPacketHandler(PacketType.GroupAccountSummaryRequest, HandleGroupAccountSummaryRequest); - AddLocalPacketHandler(PacketType.GroupAccountTransactionsRequest, HandleGroupTransactionsDetailsRequest); - AddLocalPacketHandler(PacketType.FreezeUser, HandleFreezeUser); - AddLocalPacketHandler(PacketType.EjectUser, HandleEjectUser); - AddLocalPacketHandler(PacketType.ParcelBuyPass, HandleParcelBuyPass); - AddLocalPacketHandler(PacketType.ParcelGodMarkAsContent, HandleParcelGodMarkAsContent); - AddLocalPacketHandler(PacketType.GroupActiveProposalsRequest, HandleGroupActiveProposalsRequest); - AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest); - AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes); - AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard); + AddLocalPacketHandler(PacketType.RemoveMuteListEntry, HandleRemoveMuteListEntry); + AddLocalPacketHandler(PacketType.UserReport, HandleUserReport); + AddLocalPacketHandler(PacketType.FindAgent, HandleFindAgent); + AddLocalPacketHandler(PacketType.TrackAgent, HandleTrackAgent); + AddLocalPacketHandler(PacketType.GodUpdateRegionInfo, HandleGodUpdateRegionInfoUpdate); + AddLocalPacketHandler(PacketType.GodlikeMessage, HandleGodlikeMessage); + AddLocalPacketHandler(PacketType.StateSave, HandleSaveStatePacket); + AddLocalPacketHandler(PacketType.GroupAccountDetailsRequest, HandleGroupAccountDetailsRequest); + AddLocalPacketHandler(PacketType.GroupAccountSummaryRequest, HandleGroupAccountSummaryRequest); + AddLocalPacketHandler(PacketType.GroupAccountTransactionsRequest, HandleGroupTransactionsDetailsRequest); + AddLocalPacketHandler(PacketType.FreezeUser, HandleFreezeUser); + AddLocalPacketHandler(PacketType.EjectUser, HandleEjectUser); + AddLocalPacketHandler(PacketType.ParcelBuyPass, HandleParcelBuyPass); + AddLocalPacketHandler(PacketType.ParcelGodMarkAsContent, HandleParcelGodMarkAsContent); + AddLocalPacketHandler(PacketType.GroupActiveProposalsRequest, HandleGroupActiveProposalsRequest); + AddLocalPacketHandler(PacketType.GroupVoteHistoryRequest, HandleGroupVoteHistoryRequest); + AddLocalPacketHandler(PacketType.SimWideDeletes, HandleSimWideDeletes); + AddLocalPacketHandler(PacketType.SendPostcard, HandleSendPostcard); } #region Packet Handlers @@ -4873,70 +4873,70 @@ namespace OpenSim.Region.ClientStack.LindenUDP } private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) - { - ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = - (ParcelGodMarkAsContentPacket)Packet; - - ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; - if (ParcelGodMarkAsContentHandler != null) - { - ParcelGodMarkAsContentHandler(this, - ParcelGodMarkAsContent.AgentData.AgentID, - ParcelGodMarkAsContent.ParcelData.LocalID); - return true; - } - return false; - } + { + ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = + (ParcelGodMarkAsContentPacket)Packet; + + ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; + if (ParcelGodMarkAsContentHandler != null) + { + ParcelGodMarkAsContentHandler(this, + ParcelGodMarkAsContent.AgentData.AgentID, + ParcelGodMarkAsContent.ParcelData.LocalID); + return true; + } + return false; + } + + private bool HandleFreezeUser(IClientAPI client, Packet Packet) + { + FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; + + FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUserEvent; + if (FreezeUserHandler != null) + { + FreezeUserHandler(this, + FreezeUser.AgentData.AgentID, + FreezeUser.Data.Flags, + FreezeUser.Data.TargetID); + return true; + } + return false; + } + + private bool HandleEjectUser(IClientAPI client, Packet Packet) + { + EjectUserPacket EjectUser = + (EjectUserPacket)Packet; + + EjectUserUpdate EjectUserHandler = OnParcelEjectUserEvent; + if (EjectUserHandler != null) + { + EjectUserHandler(this, + EjectUser.AgentData.AgentID, + EjectUser.Data.Flags, + EjectUser.Data.TargetID); + return true; + } + return false; + } + + private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) + { + ParcelBuyPassPacket ParcelBuyPass = + (ParcelBuyPassPacket)Packet; + + ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; + if (ParcelBuyPassHandler != null) + { + ParcelBuyPassHandler(this, + ParcelBuyPass.AgentData.AgentID, + ParcelBuyPass.ParcelData.LocalID); + return true; + } + return false; + } - private bool HandleFreezeUser(IClientAPI client, Packet Packet) - { - FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; - - FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUserEvent; - if (FreezeUserHandler != null) - { - FreezeUserHandler(this, - FreezeUser.AgentData.AgentID, - FreezeUser.Data.Flags, - FreezeUser.Data.TargetID); - return true; - } - return false; - } - - private bool HandleEjectUser(IClientAPI client, Packet Packet) - { - EjectUserPacket EjectUser = - (EjectUserPacket)Packet; - - EjectUserUpdate EjectUserHandler = OnParcelEjectUserEvent; - if (EjectUserHandler != null) - { - EjectUserHandler(this, - EjectUser.AgentData.AgentID, - EjectUser.Data.Flags, - EjectUser.Data.TargetID); - return true; - } - return false; - } - - private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) - { - ParcelBuyPassPacket ParcelBuyPass = - (ParcelBuyPassPacket)Packet; - - ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; - if (ParcelBuyPassHandler != null) - { - ParcelBuyPassHandler(this, - ParcelBuyPass.AgentData.AgentID, - ParcelBuyPass.ParcelData.LocalID); - return true; - } - return false; - } - private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) { ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; @@ -5304,34 +5304,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP } private bool HandleFindAgent(IClientAPI client, Packet Packet) - { - FindAgentPacket FindAgent = - (FindAgentPacket)Packet; - - FindAgentUpdate FindAgentHandler = OnFindAgentEvent; - if (FindAgentHandler != null) - { - FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey); - return true; - } - return false; - } + { + FindAgentPacket FindAgent = + (FindAgentPacket)Packet; + + FindAgentUpdate FindAgentHandler = OnFindAgentEvent; + if (FindAgentHandler != null) + { + FindAgentHandler(this,FindAgent.AgentBlock.Hunter,FindAgent.AgentBlock.Prey); + return true; + } + return false; + } private bool HandleTrackAgent(IClientAPI client, Packet Packet) - { - TrackAgentPacket TrackAgent = - (TrackAgentPacket)Packet; - - TrackAgentUpdate TrackAgentHandler = OnTrackAgentEvent; - if (TrackAgentHandler != null) - { - TrackAgentHandler(this, - TrackAgent.AgentData.AgentID, - TrackAgent.TargetData.PreyID); - return true; - } - return false; - } + { + TrackAgentPacket TrackAgent = + (TrackAgentPacket)Packet; + + TrackAgentUpdate TrackAgentHandler = OnTrackAgentEvent; + if (TrackAgentHandler != null) + { + TrackAgentHandler(this, + TrackAgent.AgentData.AgentID, + TrackAgent.TargetData.PreyID); + return true; + } + return false; + } private bool HandlerRezObject(IClientAPI sender, Packet Pack) { @@ -8604,68 +8604,68 @@ namespace OpenSim.Region.ClientStack.LindenUDP } private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) - { - GodUpdateRegionInfoPacket GodUpdateRegionInfo = - (GodUpdateRegionInfoPacket)Packet; + { + GodUpdateRegionInfoPacket GodUpdateRegionInfo = + (GodUpdateRegionInfoPacket)Packet; - GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdateEvent; - if (handlerGodUpdateRegionInfo != null) - { - handlerGodUpdateRegionInfo(this, - GodUpdateRegionInfo.RegionInfo.BillableFactor, - GodUpdateRegionInfo.RegionInfo.EstateID, - GodUpdateRegionInfo.RegionInfo.RegionFlags, - GodUpdateRegionInfo.RegionInfo.SimName, - GodUpdateRegionInfo.RegionInfo.RedirectGridX, - GodUpdateRegionInfo.RegionInfo.RedirectGridY); - return true; - } - return false; - } + GodUpdateRegionInfoUpdate handlerGodUpdateRegionInfo = OnGodUpdateRegionInfoUpdateEvent; + if (handlerGodUpdateRegionInfo != null) + { + handlerGodUpdateRegionInfo(this, + GodUpdateRegionInfo.RegionInfo.BillableFactor, + GodUpdateRegionInfo.RegionInfo.EstateID, + GodUpdateRegionInfo.RegionInfo.RegionFlags, + GodUpdateRegionInfo.RegionInfo.SimName, + GodUpdateRegionInfo.RegionInfo.RedirectGridX, + GodUpdateRegionInfo.RegionInfo.RedirectGridY); + return true; + } + return false; + } private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) - { - SimWideDeletesPacket SimWideDeletesRequest = - (SimWideDeletesPacket)Packet; - SimWideDeletesDelegate handlerSimWideDeletesRequest = OnSimWideDeletes; - if (handlerSimWideDeletesRequest != null) - { - handlerSimWideDeletesRequest(this, SimWideDeletesRequest.AgentData.AgentID,(int)SimWideDeletesRequest.DataBlock.Flags,SimWideDeletesRequest.DataBlock.TargetID); - return true; - } - return false; - } + { + SimWideDeletesPacket SimWideDeletesRequest = + (SimWideDeletesPacket)Packet; + SimWideDeletesDelegate handlerSimWideDeletesRequest = OnSimWideDeletes; + if (handlerSimWideDeletesRequest != null) + { + handlerSimWideDeletesRequest(this, SimWideDeletesRequest.AgentData.AgentID,(int)SimWideDeletesRequest.DataBlock.Flags,SimWideDeletesRequest.DataBlock.TargetID); + return true; + } + return false; + } - private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) - { - GodlikeMessagePacket GodlikeMessage = - (GodlikeMessagePacket)Packet; + private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) + { + GodlikeMessagePacket GodlikeMessage = + (GodlikeMessagePacket)Packet; - GodlikeMessage handlerGodlikeMessage = onGodlikeMessageEvent; - if (handlerGodlikeMessage != null) - { - handlerGodlikeMessage(this, - GodlikeMessage.MethodData.Invoice, - GodlikeMessage.MethodData.Method, - GodlikeMessage.ParamList[0].Parameter); - return true; - } - return false; - } - - private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) - { - StateSavePacket SaveStateMessage = - (StateSavePacket)Packet; - SaveStateHandler handlerSaveStatePacket = OnSaveStateEvent; - if (handlerSaveStatePacket != null) - { - handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID); - return true; - } - return false; - } - + GodlikeMessage handlerGodlikeMessage = onGodlikeMessageEvent; + if (handlerGodlikeMessage != null) + { + handlerGodlikeMessage(this, + GodlikeMessage.MethodData.Invoice, + GodlikeMessage.MethodData.Method, + GodlikeMessage.ParamList[0].Parameter); + return true; + } + return false; + } + + private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) + { + StateSavePacket SaveStateMessage = + (StateSavePacket)Packet; + SaveStateHandler handlerSaveStatePacket = OnSaveStateEvent; + if (handlerSaveStatePacket != null) + { + handlerSaveStatePacket(this,SaveStateMessage.AgentData.AgentID); + return true; + } + return false; + } + private bool HandleGodKickUser(IClientAPI sender, Packet Pack) { GodKickUserPacket gkupack = (GodKickUserPacket)Pack; @@ -9018,74 +9018,74 @@ namespace OpenSim.Region.ClientStack.LindenUDP } private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) - { - UpdateMuteListEntryPacket UpdateMuteListEntry = - (UpdateMuteListEntryPacket)Packet; - MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntryEvent; - if (handlerUpdateMuteListEntry != null) - { - handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID, - Utils.BytesToString(UpdateMuteListEntry.MuteData.MuteName), - UpdateMuteListEntry.MuteData.MuteType, - UpdateMuteListEntry.AgentData.AgentID); - return true; - } - return false; - } + { + UpdateMuteListEntryPacket UpdateMuteListEntry = + (UpdateMuteListEntryPacket)Packet; + MuteListEntryUpdate handlerUpdateMuteListEntry = OnUpdateMuteListEntryEvent; + if (handlerUpdateMuteListEntry != null) + { + handlerUpdateMuteListEntry(this, UpdateMuteListEntry.MuteData.MuteID, + Utils.BytesToString(UpdateMuteListEntry.MuteData.MuteName), + UpdateMuteListEntry.MuteData.MuteType, + UpdateMuteListEntry.AgentData.AgentID); + return true; + } + return false; + } - private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) - { - RemoveMuteListEntryPacket RemoveMuteListEntry = - (RemoveMuteListEntryPacket)Packet; - MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntryEvent; - if (handlerRemoveMuteListEntry != null) - { - handlerRemoveMuteListEntry(this, - RemoveMuteListEntry.MuteData.MuteID, - Utils.BytesToString(RemoveMuteListEntry.MuteData.MuteName), - RemoveMuteListEntry.AgentData.AgentID); - return true; - } - return false; - } - - private bool HandleUserReport(IClientAPI client, Packet Packet) - { - UserReportPacket UserReport = - (UserReportPacket)Packet; + private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) + { + RemoveMuteListEntryPacket RemoveMuteListEntry = + (RemoveMuteListEntryPacket)Packet; + MuteListEntryRemove handlerRemoveMuteListEntry = OnRemoveMuteListEntryEvent; + if (handlerRemoveMuteListEntry != null) + { + handlerRemoveMuteListEntry(this, + RemoveMuteListEntry.MuteData.MuteID, + Utils.BytesToString(RemoveMuteListEntry.MuteData.MuteName), + RemoveMuteListEntry.AgentData.AgentID); + return true; + } + return false; + } + + private bool HandleUserReport(IClientAPI client, Packet Packet) + { + UserReportPacket UserReport = + (UserReportPacket)Packet; - NewUserReport handlerUserReport = OnUserReportEvent; - if (handlerUserReport != null) - { - handlerUserReport(this, - Utils.BytesToString(UserReport.ReportData.AbuseRegionName), - UserReport.ReportData.AbuserID, - UserReport.ReportData.Category, - UserReport.ReportData.CheckFlags, - Utils.BytesToString(UserReport.ReportData.Details), - UserReport.ReportData.ObjectID, - UserReport.ReportData.Position, - UserReport.ReportData.ReportType, - UserReport.ReportData.ScreenshotID, - Utils.BytesToString(UserReport.ReportData.Summary), - UserReport.AgentData.AgentID); - return true; - } - return false; - } - - private bool HandleSendPostcard(IClientAPI client, Packet packet) - { - SendPostcardPacket SendPostcard = - (SendPostcardPacket)packet; - SendPostcard handlerSendPostcard = OnSendPostcard; - if (handlerSendPostcard != null) - { - handlerSendPostcard(this); - return true; - } - return false; - } + NewUserReport handlerUserReport = OnUserReportEvent; + if (handlerUserReport != null) + { + handlerUserReport(this, + Utils.BytesToString(UserReport.ReportData.AbuseRegionName), + UserReport.ReportData.AbuserID, + UserReport.ReportData.Category, + UserReport.ReportData.CheckFlags, + Utils.BytesToString(UserReport.ReportData.Details), + UserReport.ReportData.ObjectID, + UserReport.ReportData.Position, + UserReport.ReportData.ReportType, + UserReport.ReportData.ScreenshotID, + Utils.BytesToString(UserReport.ReportData.Summary), + UserReport.AgentData.AgentID); + return true; + } + return false; + } + + private bool HandleSendPostcard(IClientAPI client, Packet packet) + { + SendPostcardPacket SendPostcard = + (SendPostcardPacket)packet; + SendPostcard handlerSendPostcard = OnSendPostcard; + if (handlerSendPostcard != null) + { + handlerSendPostcard(this); + return true; + } + return false; + } private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack) { @@ -9355,72 +9355,72 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - - private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) - { - GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = - (GroupVoteHistoryRequestPacket)Packet; - GroupVoteHistoryRequest handlerGroupVoteHistoryRequest = OnGroupVoteHistoryRequest; - if (handlerGroupVoteHistoryRequest != null) - { - handlerGroupVoteHistoryRequest(this, GroupVoteHistoryRequest.AgentData.AgentID,GroupVoteHistoryRequest.AgentData.SessionID,GroupVoteHistoryRequest.GroupData.GroupID,GroupVoteHistoryRequest.TransactionData.TransactionID); - return true; - } - return false; - } - private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) - { - GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = - (GroupActiveProposalsRequestPacket)Packet; - GroupActiveProposalsRequest handlerGroupActiveProposalsRequest = OnGroupActiveProposalsRequest; - if (handlerGroupActiveProposalsRequest != null) - { - handlerGroupActiveProposalsRequest(this, GroupActiveProposalsRequest.AgentData.AgentID,GroupActiveProposalsRequest.AgentData.SessionID,GroupActiveProposalsRequest.GroupData.GroupID,GroupActiveProposalsRequest.TransactionData.TransactionID); - return true; - } - return false; - } - - private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) - { - GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = - (GroupAccountDetailsRequestPacket)Packet; - GroupAccountDetailsRequest handlerGroupAccountDetailsRequest = OnGroupAccountDetailsRequest; - if (handlerGroupAccountDetailsRequest != null) - { - handlerGroupAccountDetailsRequest(this, GroupAccountDetailsRequest.AgentData.AgentID,GroupAccountDetailsRequest.AgentData.GroupID,GroupAccountDetailsRequest.MoneyData.RequestID,GroupAccountDetailsRequest.AgentData.SessionID); - return true; - } - return false; - } - - private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) - { - GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = - (GroupAccountSummaryRequestPacket)Packet; - GroupAccountSummaryRequest handlerGroupAccountSummaryRequest = OnGroupAccountSummaryRequest; - if (handlerGroupAccountSummaryRequest != null) - { - handlerGroupAccountSummaryRequest(this, GroupAccountSummaryRequest.AgentData.AgentID,GroupAccountSummaryRequest.AgentData.GroupID); - return true; - } - return false; - } - - private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) - { - GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = - (GroupAccountTransactionsRequestPacket)Packet; - GroupAccountTransactionsRequest handlerGroupAccountTransactionsRequest = OnGroupAccountTransactionsRequest; - if (handlerGroupAccountTransactionsRequest != null) - { - handlerGroupAccountTransactionsRequest(this, GroupAccountTransactionsRequest.AgentData.AgentID,GroupAccountTransactionsRequest.AgentData.GroupID,GroupAccountTransactionsRequest.MoneyData.RequestID,GroupAccountTransactionsRequest.AgentData.SessionID); - return true; - } - return false; - } - + private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) + { + GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = + (GroupVoteHistoryRequestPacket)Packet; + GroupVoteHistoryRequest handlerGroupVoteHistoryRequest = OnGroupVoteHistoryRequest; + if (handlerGroupVoteHistoryRequest != null) + { + handlerGroupVoteHistoryRequest(this, GroupVoteHistoryRequest.AgentData.AgentID,GroupVoteHistoryRequest.AgentData.SessionID,GroupVoteHistoryRequest.GroupData.GroupID,GroupVoteHistoryRequest.TransactionData.TransactionID); + return true; + } + return false; + } + + private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) + { + GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = + (GroupActiveProposalsRequestPacket)Packet; + GroupActiveProposalsRequest handlerGroupActiveProposalsRequest = OnGroupActiveProposalsRequest; + if (handlerGroupActiveProposalsRequest != null) + { + handlerGroupActiveProposalsRequest(this, GroupActiveProposalsRequest.AgentData.AgentID,GroupActiveProposalsRequest.AgentData.SessionID,GroupActiveProposalsRequest.GroupData.GroupID,GroupActiveProposalsRequest.TransactionData.TransactionID); + return true; + } + return false; + } + + private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) + { + GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = + (GroupAccountDetailsRequestPacket)Packet; + GroupAccountDetailsRequest handlerGroupAccountDetailsRequest = OnGroupAccountDetailsRequest; + if (handlerGroupAccountDetailsRequest != null) + { + handlerGroupAccountDetailsRequest(this, GroupAccountDetailsRequest.AgentData.AgentID,GroupAccountDetailsRequest.AgentData.GroupID,GroupAccountDetailsRequest.MoneyData.RequestID,GroupAccountDetailsRequest.AgentData.SessionID); + return true; + } + return false; + } + + private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) + { + GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = + (GroupAccountSummaryRequestPacket)Packet; + GroupAccountSummaryRequest handlerGroupAccountSummaryRequest = OnGroupAccountSummaryRequest; + if (handlerGroupAccountSummaryRequest != null) + { + handlerGroupAccountSummaryRequest(this, GroupAccountSummaryRequest.AgentData.AgentID,GroupAccountSummaryRequest.AgentData.GroupID); + return true; + } + return false; + } + + private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) + { + GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = + (GroupAccountTransactionsRequestPacket)Packet; + GroupAccountTransactionsRequest handlerGroupAccountTransactionsRequest = OnGroupAccountTransactionsRequest; + if (handlerGroupAccountTransactionsRequest != null) + { + handlerGroupAccountTransactionsRequest(this, GroupAccountTransactionsRequest.AgentData.AgentID,GroupAccountTransactionsRequest.AgentData.GroupID,GroupAccountTransactionsRequest.MoneyData.RequestID,GroupAccountTransactionsRequest.AgentData.SessionID); + return true; + } + return false; + } + private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) { GroupTitlesRequestPacket groupTitlesRequest = @@ -14221,7 +14221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerGodKickUser != null) { handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, - gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason,gkupack.UserInfo); + gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason,gkupack.UserInfo); } } else From 3ec502f5516bda5374e5d40ad5859ec1c5fbf20f Mon Sep 17 00:00:00 2001 From: Revolution Date: Thu, 31 Dec 2009 11:41:07 -0600 Subject: [PATCH 04/11] Readds llCollisionFilter and adds llPassCollision. Applied with whitespace cleanup Signed-off-by: Melanie --- .../Framework/Scenes/SceneObjectGroup.cs | 11 + .../Framework/Scenes/SceneObjectPart.cs | 327 ++++++++++++++---- .../Shared/Api/Implementation/LSL_Api.cs | 19 +- 3 files changed, 293 insertions(+), 64 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e9ed066a13..34d8b49c83 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -340,6 +340,17 @@ namespace OpenSim.Region.Framework.Scenes { get { return true; } } + + private bool m_passCollision; + public bool PassCollision + { + get { return m_passCollision; } + set + { + m_passCollision = value; + HasGroupChanged = true; + } + } public bool IsSelected { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index c0243a5b61..b50def309c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -140,6 +140,9 @@ namespace OpenSim.Region.Framework.Scenes [XmlIgnore] public UUID FromItemID; + + [XmlIgnore] + private Dictionary m_CollisionFilter = new Dictionary(); /// /// The UUID of the user inventory item from which this object was rezzed if this is a root part. @@ -452,6 +455,17 @@ namespace OpenSim.Region.Framework.Scenes } } + + [XmlIgnore] + public Dictionary CollisionFilter + { + get { return m_CollisionFilter; } + set + { + m_CollisionFilter = value; + } + } + public ulong RegionHandle { get { return m_regionHandle; } @@ -1876,18 +1890,49 @@ namespace OpenSim.Region.Framework.Scenes return; SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); + string data = ""; if (obj != null) { - DetectedObject detobj = new DetectedObject(); - detobj.keyUUID = obj.UUID; - detobj.nameStr = obj.Name; - detobj.ownerUUID = obj._ownerID; - detobj.posVector = obj.AbsolutePosition; - detobj.rotQuat = obj.GetWorldRotation(); - detobj.velVector = obj.Velocity; - detobj.colliderType = 0; - detobj.groupUUID = obj._groupID; - colliding.Add(detobj); + if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this object + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = obj.UUID; + detobj.nameStr = obj.Name; + detobj.ownerUUID = obj._ownerID; + detobj.posVector = obj.AbsolutePosition; + detobj.rotQuat = obj.GetWorldRotation(); + detobj.velVector = obj.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = obj._groupID; + colliding.Add(detobj); + } + //If it is 0, it is to not accept collisions from this object + else + { + } + } + else + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = obj.UUID; + detobj.nameStr = obj.Name; + detobj.ownerUUID = obj._ownerID; + detobj.posVector = obj.AbsolutePosition; + detobj.rotQuat = obj.GetWorldRotation(); + detobj.velVector = obj.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = obj._groupID; + colliding.Add(detobj); + } + } } else { @@ -1899,16 +1944,47 @@ namespace OpenSim.Region.Framework.Scenes if (av.LocalId == localId) { - DetectedObject detobj = new DetectedObject(); - detobj.keyUUID = av.UUID; - detobj.nameStr = av.ControllingClient.Name; - detobj.ownerUUID = av.UUID; - detobj.posVector = av.AbsolutePosition; - detobj.rotQuat = av.Rotation; - detobj.velVector = av.Velocity; - detobj.colliderType = 0; - detobj.groupUUID = av.ControllingClient.ActiveGroupId; - colliding.Add(detobj); + if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this avatar + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = av.UUID; + detobj.nameStr = av.ControllingClient.Name; + detobj.ownerUUID = av.UUID; + detobj.posVector = av.AbsolutePosition; + detobj.rotQuat = av.Rotation; + detobj.velVector = av.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = av.ControllingClient.ActiveGroupId; + colliding.Add(detobj); + } + //If it is 0, it is to not accept collisions from this avatar + else + { + } + } + else + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = av.UUID; + detobj.nameStr = av.ControllingClient.Name; + detobj.ownerUUID = av.UUID; + detobj.posVector = av.AbsolutePosition; + detobj.rotQuat = av.Rotation; + detobj.velVector = av.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = av.ControllingClient.ActiveGroupId; + colliding.Add(detobj); + } + } + } } } @@ -1922,7 +1998,10 @@ namespace OpenSim.Region.Framework.Scenes if (m_parentGroup.Scene == null) return; - + if(m_parentGroup.PassCollision == true) + { + //TODO: Add pass to root prim! + } m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage); } } @@ -1947,39 +2026,101 @@ namespace OpenSim.Region.Framework.Scenes return; SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); + string data = ""; if (obj != null) { - DetectedObject detobj = new DetectedObject(); - detobj.keyUUID = obj.UUID; - detobj.nameStr = obj.Name; - detobj.ownerUUID = obj._ownerID; - detobj.posVector = obj.AbsolutePosition; - detobj.rotQuat = obj.GetWorldRotation(); - detobj.velVector = obj.Velocity; - detobj.colliderType = 0; - detobj.groupUUID = obj._groupID; - colliding.Add(detobj); + if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this object + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = obj.UUID; + detobj.nameStr = obj.Name; + detobj.ownerUUID = obj._ownerID; + detobj.posVector = obj.AbsolutePosition; + detobj.rotQuat = obj.GetWorldRotation(); + detobj.velVector = obj.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = obj._groupID; + colliding.Add(detobj); + } + //If it is 0, it is to not accept collisions from this object + else + { + } + } + else + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = obj.UUID; + detobj.nameStr = obj.Name; + detobj.ownerUUID = obj._ownerID; + detobj.posVector = obj.AbsolutePosition; + detobj.rotQuat = obj.GetWorldRotation(); + detobj.velVector = obj.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = obj._groupID; + colliding.Add(detobj); + } + } } else { ScenePresence[] avlist = m_parentGroup.Scene.GetScenePresences(); - + for (int i = 0; i < avlist.Length; i++) { ScenePresence av = avlist[i]; if (av.LocalId == localId) { - DetectedObject detobj = new DetectedObject(); - detobj.keyUUID = av.UUID; - detobj.nameStr = av.Name; - detobj.ownerUUID = av.UUID; - detobj.posVector = av.AbsolutePosition; - detobj.rotQuat = av.Rotation; - detobj.velVector = av.Velocity; - detobj.colliderType = 0; - detobj.groupUUID = av.ControllingClient.ActiveGroupId; - colliding.Add(detobj); + if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this avatar + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = av.UUID; + detobj.nameStr = av.ControllingClient.Name; + detobj.ownerUUID = av.UUID; + detobj.posVector = av.AbsolutePosition; + detobj.rotQuat = av.Rotation; + detobj.velVector = av.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = av.ControllingClient.ActiveGroupId; + colliding.Add(detobj); + } + //If it is 0, it is to not accept collisions from this avatar + else + { + } + } + else + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = av.UUID; + detobj.nameStr = av.ControllingClient.Name; + detobj.ownerUUID = av.UUID; + detobj.posVector = av.AbsolutePosition; + detobj.rotQuat = av.Rotation; + detobj.velVector = av.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = av.ControllingClient.ActiveGroupId; + colliding.Add(detobj); + } + } + } } } @@ -2016,18 +2157,49 @@ namespace OpenSim.Region.Framework.Scenes if (m_parentGroup.Scene == null) return; SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); + string data = ""; if (obj != null) { - DetectedObject detobj = new DetectedObject(); - detobj.keyUUID = obj.UUID; - detobj.nameStr = obj.Name; - detobj.ownerUUID = obj._ownerID; - detobj.posVector = obj.AbsolutePosition; - detobj.rotQuat = obj.GetWorldRotation(); - detobj.velVector = obj.Velocity; - detobj.colliderType = 0; - detobj.groupUUID = obj._groupID; - colliding.Add(detobj); + if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this object + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = obj.UUID; + detobj.nameStr = obj.Name; + detobj.ownerUUID = obj._ownerID; + detobj.posVector = obj.AbsolutePosition; + detobj.rotQuat = obj.GetWorldRotation(); + detobj.velVector = obj.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = obj._groupID; + colliding.Add(detobj); + } + //If it is 0, it is to not accept collisions from this object + else + { + } + } + else + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = obj.UUID; + detobj.nameStr = obj.Name; + detobj.ownerUUID = obj._ownerID; + detobj.posVector = obj.AbsolutePosition; + detobj.rotQuat = obj.GetWorldRotation(); + detobj.velVector = obj.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = obj._groupID; + colliding.Add(detobj); + } + } } else { @@ -2039,16 +2211,47 @@ namespace OpenSim.Region.Framework.Scenes if (av.LocalId == localId) { - DetectedObject detobj = new DetectedObject(); - detobj.keyUUID = av.UUID; - detobj.nameStr = av.Name; - detobj.ownerUUID = av.UUID; - detobj.posVector = av.AbsolutePosition; - detobj.rotQuat = av.Rotation; - detobj.velVector = av.Velocity; - detobj.colliderType = 0; - detobj.groupUUID = av.ControllingClient.ActiveGroupId; - colliding.Add(detobj); + if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this avatar + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = av.UUID; + detobj.nameStr = av.ControllingClient.Name; + detobj.ownerUUID = av.UUID; + detobj.posVector = av.AbsolutePosition; + detobj.rotQuat = av.Rotation; + detobj.velVector = av.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = av.ControllingClient.ActiveGroupId; + colliding.Add(detobj); + } + //If it is 0, it is to not accept collisions from this avatar + else + { + } + } + else + { + bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); + //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work + if(found) + { + DetectedObject detobj = new DetectedObject(); + detobj.keyUUID = av.UUID; + detobj.nameStr = av.ControllingClient.Name; + detobj.ownerUUID = av.UUID; + detobj.posVector = av.AbsolutePosition; + detobj.rotQuat = av.Rotation; + detobj.velVector = av.Velocity; + detobj.colliderType = 0; + detobj.groupUUID = av.ControllingClient.ActiveGroupId; + colliding.Add(detobj); + } + } + } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 6102504891..d242506466 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2752,7 +2752,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionFilter(string name, string id, int accept) { m_host.AddScriptLPS(1); - NotImplemented("llCollisionFilter"); + m_host.CollisionFilter.Clear(); + if(id != null) + { + m_host.CollisionFilter.Add(accept,id); + } + else + { + m_host.CollisionFilter.Add(accept,name); + } } public void llTakeControls(int controls, int accept, int pass_on) @@ -4232,7 +4240,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPassCollisions(int pass) { m_host.AddScriptLPS(1); - NotImplemented("llPassCollisions"); + if(pass == 0) + { + m_host.ParentGroup.PassCollision = false; + } + else + { + m_host.ParentGroup.PassCollision = true; + } } public LSL_String llGetScriptName() From 61f63fdc38a4108305a833f56d9fd82d35c5d564 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 31 Dec 2009 23:51:53 +0000 Subject: [PATCH 05/11] Put PassCollision on the ignore list for testing, since we don't save that yet. --- OpenSim/Data/Tests/BasicRegionTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index f76962cd37..676c6ba968 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs @@ -577,6 +577,7 @@ namespace OpenSim.Data.Tests .IgnoreProperty(x=>x.RegionUUID) .IgnoreProperty(x=>x.Scene) .IgnoreProperty(x=>x.Children) + .IgnoreProperty(x=>x.PassCollision) .IgnoreProperty(x=>x.RootPart)); } From 0d9591bf3562955a39c57dd289d0cc0bb0ba85a3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 1 Jan 2010 22:51:00 +0000 Subject: [PATCH 06/11] Prevent the creation of duplicate inventory folders in the case of a login database issue. Now the login will instaead fail later. --- OpenSim/Data/MySQL/MySQLInventoryData.cs | 2 +- .../Services/InventoryService/InventoryService.cs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index d560c5f1a4..f7b286f107 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -264,7 +264,7 @@ namespace OpenSim.Data.MySQL { database.Reconnect(); m_log.Error(e.ToString()); - return null; + throw; } } diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index d4da4d3d0c..95007f1f2c 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; @@ -102,7 +103,17 @@ namespace OpenSim.Services.InventoryService // See IInventoryServices public bool CreateUserInventory(UUID user) { - InventoryFolderBase existingRootFolder = GetRootFolder(user); + InventoryFolderBase existingRootFolder; + try + { + existingRootFolder = GetRootFolder(user); + } + catch (Exception e) + { + // Munch the exception, it has already been reported + // + return false; + } if (null != existingRootFolder) { From 9f273717a2e06fa462ba38ac61721af4c9c4f10f Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 2 Jan 2010 21:21:31 +0100 Subject: [PATCH 07/11] Add virtual method StateChange to ScriptBaseClass --- OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index 121159c0d8..edbbc2a2f2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs @@ -126,6 +126,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_InitialValues = GetVars(); } + public virtual void StateChange(string newState) + { + } + public void Close() { // m_sponser.Close(); From 71fdc24f5c3d5805e185aac949e38f3c8058e03e Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 2 Jan 2010 21:21:31 +0100 Subject: [PATCH 08/11] Add virtual method StateChange to ScriptBaseClass --- OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs index a44abb05b5..b138da38a3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/ScriptBase.cs @@ -128,6 +128,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_InitialValues = GetVars(); } + public virtual void StateChange(string newState) + { + } + public void Close() { // m_sponser.Close(); From 70d5b1c34cf2eb6621f383169fdee03966850762 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 4 Jan 2010 06:10:45 +0900 Subject: [PATCH 09/11] Formatting cleanup. Add copyright headers. --- .../RemoteController/RemoteAdminPlugin.cs | 4 +- .../Client/MXP/ClientStack/MXPClientView.cs | 36 +- .../ClientStack/SirikataClientView.cs | 65 ++- .../Sirikata/Protocol/MessageHeader.pbj.cs | 27 + OpenSim/Client/Sirikata/Protocol/PBJ.cs | 29 +- .../Sirikata/Protocol/Persistence.pbj.cs | 45 +- .../Client/Sirikata/Protocol/Physics.pbj.cs | 27 + .../Client/Sirikata/Protocol/Sirikata.pbj.cs | 29 +- .../Sirikata/Protocol/Subscription.pbj.cs | 27 + OpenSim/Client/Sirikata/Protocol/Test.pbj.cs | 33 +- OpenSim/Client/Sirikata/Protocol/Time.pbj.cs | 27 + OpenSim/Client/Sirikata/SirikataModule.cs | 4 +- .../VWoHTTP/ClientStack/VWHClientView.cs | 36 +- OpenSim/Data/MySQL/MySQLInventoryData.cs | 6 +- OpenSim/Framework/IClientAPI.cs | 2 +- .../Servers/HttpServer/BaseHttpServer.cs | 2 +- .../ClientStack/LindenUDP/LLClientView.cs | 12 +- .../Avatar/Friends/FriendsModule.cs | 34 +- .../CoreModules/Avatar/Gods/GodsModule.cs | 2 +- .../Archiver/InventoryArchiveReadRequest.cs | 4 +- .../Archiver/InventoryArchiveWriteRequest.cs | 6 +- .../Framework/EventQueue/EventQueueHelper.cs | 10 +- .../World/Archiver/ArchiveReadRequest.cs | 2 +- .../Archiver/ArchiveWriteRequestExecution.cs | 2 +- .../World/Archiver/ArchiverModule.cs | 4 +- .../CoreModules/World/Land/LandChannel.cs | 2 +- .../World/Land/LandManagementModule.cs | 2 +- .../World/Permissions/PermissionsModule.cs | 2 +- .../Examples/SimpleModule/MyNpcCharacter.cs | 36 +- .../Framework/Interfaces/ILandChannel.cs | 2 +- .../Interfaces/IRegionArchiverModule.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 10 +- .../Framework/Scenes/SceneObjectPart.cs | 42 +- .../Region/Framework/Scenes/ScenePresence.cs | 2 +- .../Framework/Scenes/SimStatsReporter.cs | 22 +- .../Server/IRCClientView.cs | 36 +- .../Minimodule/Interfaces/IObject.cs | 4 +- .../Scripting/Minimodule/SOPObject.cs | 10 +- .../Scripting/Minimodule/World.cs | 4 +- .../OptionalModules/World/NPC/NPCAvatar.cs | 36 +- .../BasicPhysicsPlugin/BasicPhysicsActor.cs | 8 +- .../BulletDotNETCharacter.cs | 8 +- .../Region/Physics/Manager/PhysicsActor.cs | 2 +- .../Region/Physics/OdePlugin/ODEDynamics.cs | 436 ++++++++------- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 498 +++++++++--------- .../OdePlugin/ODERayCastRequestManager.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 20 +- .../Shared/Api/Implementation/LSL_Api.cs | 6 +- .../Shared/Api/Implementation/OSSL_Api.cs | 148 +++--- .../Shared/Api/Interface/IOSSL_Api.cs | 2 +- .../Shared/Api/Runtime/LSL_Constants.cs | 46 +- .../Shared/Api/Runtime/OSSL_Stub.cs | 12 +- .../Region/ScriptEngine/XEngine/XEngine.cs | 2 +- OpenSim/Tests/Common/Mock/TestClient.cs | 36 +- 54 files changed, 1075 insertions(+), 838 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index adf79674e9..94007884a2 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -322,8 +322,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result)) { // the url is valid - string fileType = file.Substring(file.LastIndexOf('/') + 1); - terrainModule.LoadFromStream(fileType, result); + string fileType = file.Substring(file.LastIndexOf('/') + 1); + terrainModule.LoadFromStream(fileType, result); } } else diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index b3582e9ee6..dbb9611a3a 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -757,24 +757,24 @@ namespace OpenSim.Client.MXP.ClientStack public event MuteListRequest OnMuteListRequest; public event AvatarInterestUpdate OnAvatarInterestUpdate; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; public event PlacesQuery OnPlacesQuery; diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index 75b234741c..66c0eb25c8 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using System.Net; using System.Net.Sockets; @@ -375,24 +402,24 @@ namespace OpenSim.Client.Sirikata.ClientStack public event MuteListRequest OnMuteListRequest; public event PlacesQuery OnPlacesQuery; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; public void SetDebugPacketLevel(int newDebug) { throw new System.NotImplementedException(); diff --git a/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs b/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs index eadb43bdaa..fb4963fc93 100644 --- a/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.Protocol { diff --git a/OpenSim/Client/Sirikata/Protocol/PBJ.cs b/OpenSim/Client/Sirikata/Protocol/PBJ.cs index 46888b5161..9b1951a6b1 100644 --- a/OpenSim/Client/Sirikata/Protocol/PBJ.cs +++ b/OpenSim/Client/Sirikata/Protocol/PBJ.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; namespace PBJ { diff --git a/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs index 54ca1f4b72..196b0b9527 100644 --- a/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.Persistence.Protocol { @@ -812,7 +839,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Reads(int index) { return new StorageElement(super.GetReads(index)); } - public Builder AddReads(StorageElement value ) { + public Builder AddReads(StorageElement value) { super.AddReads(value._PBJSuper); return this; } @@ -919,7 +946,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Reads(int index) { return new StorageElement(super.GetReads(index)); } - public Builder AddReads(StorageElement value ) { + public Builder AddReads(StorageElement value) { super.AddReads(value._PBJSuper); return this; } @@ -1026,7 +1053,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Writes(int index) { return new StorageElement(super.GetWrites(index)); } - public Builder AddWrites(StorageElement value ) { + public Builder AddWrites(StorageElement value) { super.AddWrites(value._PBJSuper); return this; } @@ -1155,7 +1182,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Reads(int index) { return new StorageElement(super.GetReads(index)); } - public Builder AddReads(StorageElement value ) { + public Builder AddReads(StorageElement value) { super.AddReads(value._PBJSuper); return this; } @@ -1170,7 +1197,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Writes(int index) { return new StorageElement(super.GetWrites(index)); } - public Builder AddWrites(StorageElement value ) { + public Builder AddWrites(StorageElement value) { super.AddWrites(value._PBJSuper); return this; } @@ -1322,7 +1349,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Reads(int index) { return new StorageElement(super.GetReads(index)); } - public Builder AddReads(StorageElement value ) { + public Builder AddReads(StorageElement value) { super.AddReads(value._PBJSuper); return this; } @@ -1337,7 +1364,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Writes(int index) { return new StorageElement(super.GetWrites(index)); } - public Builder AddWrites(StorageElement value ) { + public Builder AddWrites(StorageElement value) { super.AddWrites(value._PBJSuper); return this; } @@ -1352,7 +1379,7 @@ namespace Sirikata.Persistence.Protocol { public CompareElement Compares(int index) { return new CompareElement(super.GetCompares(index)); } - public Builder AddCompares(CompareElement value ) { + public Builder AddCompares(CompareElement value) { super.AddCompares(value._PBJSuper); return this; } @@ -1493,7 +1520,7 @@ namespace Sirikata.Persistence.Protocol { public StorageElement Reads(int index) { return new StorageElement(super.GetReads(index)); } - public Builder AddReads(StorageElement value ) { + public Builder AddReads(StorageElement value) { super.AddReads(value._PBJSuper); return this; } diff --git a/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs index decd2046e6..9fb5a28876 100644 --- a/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.Physics.Protocol { diff --git a/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs index 9c0e3e733c..fcf01527ba 100644 --- a/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.Protocol { @@ -3809,7 +3836,7 @@ namespace Sirikata.Protocol { public ConnectToSpace SpaceProperties(int index) { return new ConnectToSpace(super.GetSpaceProperties(index)); } - public Builder AddSpaceProperties(ConnectToSpace value ) { + public Builder AddSpaceProperties(ConnectToSpace value) { super.AddSpaceProperties(value._PBJSuper); return this; } diff --git a/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs index ca6c7e838e..c8c2fbf9bc 100644 --- a/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.Subscription.Protocol { diff --git a/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs index c753c36d47..bcd02fa3d5 100644 --- a/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.PB { @@ -407,7 +434,7 @@ namespace Sirikata.PB { public Types.SubMessage Submessers(int index) { return new Types.SubMessage(super.GetSubmessers(index)); } - public Builder AddSubmessers(Types.SubMessage value ) { + public Builder AddSubmessers(Types.SubMessage value) { super.AddSubmessers(value._PBJSuper); return this; } @@ -1651,7 +1678,7 @@ namespace Sirikata.PB { public Types.SubMessage Submessers(int index) { return new Types.SubMessage(super.GetSubmessers(index)); } - public Builder AddSubmessers(Types.SubMessage value ) { + public Builder AddSubmessers(Types.SubMessage value) { super.AddSubmessers(value._PBJSuper); return this; } @@ -1709,7 +1736,7 @@ namespace Sirikata.PB { public ExternalMessage Extmessers(int index) { return new ExternalMessage(super.GetExtmessers(index)); } - public Builder AddExtmessers(ExternalMessage value ) { + public Builder AddExtmessers(ExternalMessage value) { super.AddExtmessers(value._PBJSuper); return this; } diff --git a/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs index c3e9e73057..15b4ae7e5d 100644 --- a/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs +++ b/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs @@ -1,3 +1,30 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using pbd = global::Google.ProtocolBuffers.Descriptors; using pb = global::Google.ProtocolBuffers; namespace Sirikata.Network.Protocol { diff --git a/OpenSim/Client/Sirikata/SirikataModule.cs b/OpenSim/Client/Sirikata/SirikataModule.cs index cbb6c23653..01dc9d70cc 100644 --- a/OpenSim/Client/Sirikata/SirikataModule.cs +++ b/OpenSim/Client/Sirikata/SirikataModule.cs @@ -93,7 +93,7 @@ namespace OpenSim.Client.Sirikata public void PostInitialise() { - if(!m_enabled) + if (!m_enabled) return; m_listener = new TcpListener(IPAddress.Any, 5943); @@ -102,7 +102,7 @@ namespace OpenSim.Client.Sirikata private void ListenLoop() { - while(m_running) + while (m_running) { m_listener.BeginAcceptTcpClient(AcceptSocket, m_listener); } diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 029e23ff54..6f6d23170a 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -406,24 +406,24 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public event AvatarInterestUpdate OnAvatarInterestUpdate = delegate { }; public event PlacesQuery OnPlacesQuery = delegate { }; public event FindAgentUpdate OnFindAgentEvent = delegate { }; - public event TrackAgentUpdate OnTrackAgentEvent = delegate { }; - public event NewUserReport OnUserReportEvent = delegate { }; - public event SaveStateHandler OnSaveStateEvent = delegate { }; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest = delegate { }; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest = delegate { }; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest = delegate { }; - public event FreezeUserUpdate OnParcelFreezeUserEvent = delegate { }; - public event EjectUserUpdate OnParcelEjectUserEvent = delegate { }; - public event ParcelBuyPass OnParcelBuyPass = delegate { }; - public event ParcelGodMark OnParcelGodMark = delegate { }; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest = delegate { }; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest = delegate { }; - public event SimWideDeletesDelegate OnSimWideDeletes = delegate { }; - public event SendPostcard OnSendPostcard = delegate { }; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent = delegate { }; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent = delegate { }; - public event GodlikeMessage onGodlikeMessageEvent = delegate { }; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent = delegate { }; + public event TrackAgentUpdate OnTrackAgentEvent = delegate { }; + public event NewUserReport OnUserReportEvent = delegate { }; + public event SaveStateHandler OnSaveStateEvent = delegate { }; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest = delegate { }; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest = delegate { }; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest = delegate { }; + public event FreezeUserUpdate OnParcelFreezeUserEvent = delegate { }; + public event EjectUserUpdate OnParcelEjectUserEvent = delegate { }; + public event ParcelBuyPass OnParcelBuyPass = delegate { }; + public event ParcelGodMark OnParcelGodMark = delegate { }; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest = delegate { }; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest = delegate { }; + public event SimWideDeletesDelegate OnSimWideDeletes = delegate { }; + public event SendPostcard OnSendPostcard = delegate { }; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent = delegate { }; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent = delegate { }; + public event GodlikeMessage onGodlikeMessageEvent = delegate { }; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent = delegate { }; diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index f7b286f107..f566fdec2e 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -91,7 +91,7 @@ namespace OpenSim.Data.MySQL rollbackStore = GridDataMySqlFile.ParseFileReadValue("rollback") == "true"; opengridmode = GridDataMySqlFile.ParseFileReadValue("opengridmode") == "true"; - if(rollbackStore) + if (rollbackStore) m_log.Warn("[MysqlInventory] Enabling rollback mode in: " + rollbackDir); database = @@ -552,7 +552,7 @@ namespace OpenSim.Data.MySQL private void StoreRollbackItem(UUID ItemID) { - if(rollbackStore == true) + if (rollbackStore == true) { string todaysPath = RollbackGetTodaysPath(); @@ -1008,7 +1008,7 @@ namespace OpenSim.Data.MySQL StoreRollbackFolder(f.ID); deleteOneFolder(f.ID); - if(rollbackStore) + if (rollbackStore) { foreach (InventoryItemBase itemBase in getInventoryInFolder(f.ID)) { diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 9f2a0ae668..60c1ac773f 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1075,7 +1075,7 @@ namespace OpenSim.Framework event SaveStateHandler OnSaveStateEvent; event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; event FreezeUserUpdate OnParcelFreezeUserEvent; event EjectUserUpdate OnParcelEjectUserEvent; event ParcelBuyPass OnParcelBuyPass; diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 857c584027..214f936e1e 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -741,7 +741,7 @@ namespace OpenSim.Framework.Servers.HttpServer xmlRpcResponse = new XmlRpcResponse(); // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php - xmlRpcResponse.SetFault(-32603, errorMessage); + xmlRpcResponse.SetFault(-32603, errorMessage); } // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0ec2ed56f9..9944852c4e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -304,7 +304,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event SaveStateHandler OnSaveStateEvent; public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; public event FreezeUserUpdate OnParcelFreezeUserEvent; public event EjectUserUpdate OnParcelEjectUserEvent; public event ParcelBuyPass OnParcelBuyPass; @@ -828,7 +828,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendGroupActiveProposals(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary ProposalText) { - foreach(KeyValuePair Blank in VoteID) + foreach (KeyValuePair Blank in VoteID) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); @@ -851,7 +851,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP GAPIRP.ProposalData[0] = ProposalData; OutPacket(GAPIRP, ThrottleOutPacketType.Task); } - if(VoteID.Count == 0) + if (VoteID.Count == 0) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); @@ -878,7 +878,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendGroupVoteHistory(IClientAPI sender,UUID agentID, UUID sessionID, UUID groupID, UUID transactionID, Dictionary VoteID, Dictionary VoteInitiator, Dictionary Majority, Dictionary Quorum, Dictionary TerseDateID, Dictionary StartDateTime, Dictionary EndDateTime, Dictionary VoteType, Dictionary VoteResult, Dictionary ProposalText) { - foreach(KeyValuePair Blank in VoteID) + foreach (KeyValuePair Blank in VoteID) { GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); @@ -904,7 +904,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP GVHIRP.VoteItem[0] = VoteItem; OutPacket(GVHIRP, ThrottleOutPacketType.Task); } - if(VoteID.Count == 0) + if (VoteID.Count == 0) { GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); @@ -5915,7 +5915,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) { - // Linden Client limitation.. + // Linden Client limitation.. if (avSetStartLocationRequestPacket.StartLocationData.LocationPos.X == 255.5f || avSetStartLocationRequestPacket.StartLocationData.LocationPos.Y == 255.5f) { diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 580e06f516..a4a649c43b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -1119,23 +1119,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends } public void FindAgent(IClientAPI remoteClient, UUID hunter, UUID target) { - List friendList = GetUserFriends(hunter); - foreach (FriendListItem item in friendList) - { - if(item.onlinestatus == true) - { - if(item.Friend == target && (item.FriendPerms & (uint)FriendRights.CanSeeOnMap) != 0) - { - ScenePresence SPTarget = ((Scene)remoteClient.Scene).GetScenePresence(target); - string regionname = SPTarget.Scene.RegionInfo.RegionName; - remoteClient.SendScriptTeleportRequest("FindAgent", regionname,new Vector3(SPTarget.AbsolutePosition),new Vector3(SPTarget.Lookat)); - } - } - else - { - remoteClient.SendAgentAlertMessage("The agent you are looking for is not online.", false); - } - } + List friendList = GetUserFriends(hunter); + foreach (FriendListItem item in friendList) + { + if (item.onlinestatus == true) + { + if (item.Friend == target && (item.FriendPerms & (uint)FriendRights.CanSeeOnMap) != 0) + { + ScenePresence SPTarget = ((Scene)remoteClient.Scene).GetScenePresence(target); + string regionname = SPTarget.Scene.RegionInfo.RegionName; + remoteClient.SendScriptTeleportRequest("FindAgent", regionname,new Vector3(SPTarget.AbsolutePosition),new Vector3(SPTarget.Lookat)); + } + } + else + { + remoteClient.SendAgentAlertMessage("The agent you are looking for is not online.", false); + } + } } public List GetUserFriends(UUID agentID) diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 7e1bed53c9..50171a391e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods m_scene.ForEachClient( delegate(IClientAPI controller) - { + { if (controller.AgentId != godID) controller.Kick(reasonStr); } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 0ced2f90dd..160a9bdfcc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -359,12 +359,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.CommsManager); if (UUID.Zero != ospResolvedId) - { + { item.CreatorIdAsUuid = ospResolvedId; // XXX: For now, don't preserve the OSPA in the creator id (which actually gets persisted to the // database). Instead, replace with the UUID that we found. - item.CreatorId = ospResolvedId.ToString(); + item.CreatorId = ospResolvedId.ToString(); } else { diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index c85d974646..98b686e5b1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -117,12 +117,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver } protected void ReceivedAllAssets(ICollection assetsFoundUuids, ICollection assetsNotFoundUuids) - { + { Exception reportedException = null; bool succeeded = true; try - { + { // We're almost done. Just need to write out the control file now m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); @@ -269,7 +269,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_module.TriggerInventoryArchiveSaved( m_id, false, m_userInfo, m_invPath, m_saveStream, new Exception(errorMessage)); - return; + return; } m_archiveWriter = new TarArchiveWriter(m_saveStream); diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index 67fc8e6c23..efa60bbb1e 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs @@ -484,11 +484,11 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue QueryDataMap.Add("GlobalZ", OSD.FromInteger((int)groupDataBlock.GlobalZ)); QueryDataMap.Add("Name", OSD.FromBinary(groupDataBlock.Name)); QueryDataMap.Add("OwnerID", OSD.FromUUID(groupDataBlock.OwnerID)); - QueryDataMap.Add("SimName", OSD.FromBinary(groupDataBlock.SimName)); - QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); - QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); - QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); - + QueryDataMap.Add("SimName", OSD.FromBinary(groupDataBlock.SimName)); + QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); + QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); + QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); + QueryData.Add(QueryDataMap); } body.Add("QueryData", QueryData); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index af72968243..52add238c6 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver List serialisedParcels = new List(); string filePath = "NONE"; - TarArchiveReader archive = new TarArchiveReader(m_loadStream); + TarArchiveReader archive = new TarArchiveReader(m_loadStream); byte[] data; TarArchiveReader.TarEntryType entryType; diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index 75c4557d97..9fc6ec47c2 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_scene.RegionInfo.RegionName); - m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); + m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); } protected internal void Save(ICollection assetsFoundUuids, ICollection assetsNotFoundUuids) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 27763bb7f3..fc8d4e1d04 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// The file used to load and save an opensimulator archive if no filename has been specified /// - protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; + protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; public string Name { @@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver { DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty); } - } + } /// /// Save a region to a file, including all the assets needed to restore it. diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 81024db979..1fbc733704 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs @@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.Land ILandObject obj = new LandObject(UUID.Zero, false, m_scene); obj.LandData.Name = "NO LAND"; return obj; - } + } public List AllParcels() { diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 9a2ef5003d..9b39b09f2b 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -627,7 +627,7 @@ namespace OpenSim.Region.CoreModules.World.Land return null; } } - } + } #endregion diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index c9b307156c..e837e9adcb 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -800,7 +800,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions } protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers) - { + { if (parcel.LandData.OwnerID == user) { // Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 086103b9be..27fad61b39 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -275,24 +275,24 @@ namespace OpenSim.Region.Examples.SimpleModule public event PlacesQuery OnPlacesQuery; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs index 6fe6118179..f71e31dcfa 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs @@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// - List ParcelsNearPoint(Vector3 position); + List ParcelsNearPoint(Vector3 position); /// /// Get the parcel given the land's local id. diff --git a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs index 1a8babcdaf..991d60ca11 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs @@ -34,7 +34,7 @@ namespace OpenSim.Region.Framework.Interfaces /// Interface to region archive functionality /// public interface IRegionArchiverModule - { + { void HandleLoadOarConsoleCommand(string module, string[] cmdparams); void HandleSaveOarConsoleCommand(string module, string[] cmdparams); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0e1e2be434..764ac6014f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -387,11 +387,11 @@ namespace OpenSim.Region.Framework.Scenes { get { return StatsReporter.getLastReportedSimFPS(); } } - - public float[] SimulatorStats - { - get { return StatsReporter.getLastReportedSimStats(); } - } + + public float[] SimulatorStats + { + get { return StatsReporter.getLastReportedSimStats(); } + } public string DefaultScriptEngine { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b50def309c..22a8ca121c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1893,11 +1893,11 @@ namespace OpenSim.Region.Framework.Scenes string data = ""; if (obj != null) { - if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this object - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = obj.UUID; @@ -1919,7 +1919,7 @@ namespace OpenSim.Region.Framework.Scenes { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = obj.UUID; @@ -1944,11 +1944,11 @@ namespace OpenSim.Region.Framework.Scenes if (av.LocalId == localId) { - if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this avatar - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = av.UUID; @@ -1970,7 +1970,7 @@ namespace OpenSim.Region.Framework.Scenes { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = av.UUID; @@ -1998,7 +1998,7 @@ namespace OpenSim.Region.Framework.Scenes if (m_parentGroup.Scene == null) return; - if(m_parentGroup.PassCollision == true) + if (m_parentGroup.PassCollision == true) { //TODO: Add pass to root prim! } @@ -2029,11 +2029,11 @@ namespace OpenSim.Region.Framework.Scenes string data = ""; if (obj != null) { - if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this object - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = obj.UUID; @@ -2055,7 +2055,7 @@ namespace OpenSim.Region.Framework.Scenes { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = obj.UUID; @@ -2080,11 +2080,11 @@ namespace OpenSim.Region.Framework.Scenes if (av.LocalId == localId) { - if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this avatar - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = av.UUID; @@ -2106,7 +2106,7 @@ namespace OpenSim.Region.Framework.Scenes { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = av.UUID; @@ -2160,11 +2160,11 @@ namespace OpenSim.Region.Framework.Scenes string data = ""; if (obj != null) { - if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this object - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = obj.UUID; @@ -2186,7 +2186,7 @@ namespace OpenSim.Region.Framework.Scenes { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = obj.UUID; @@ -2211,11 +2211,11 @@ namespace OpenSim.Region.Framework.Scenes if (av.LocalId == localId) { - if(m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) + if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this avatar - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = av.UUID; @@ -2237,7 +2237,7 @@ namespace OpenSim.Region.Framework.Scenes { bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work - if(found) + if (found) { DetectedObject detobj = new DetectedObject(); detobj.keyUUID = av.UUID; @@ -2881,8 +2881,8 @@ namespace OpenSim.Region.Framework.Scenes { m_parentGroup.stopLookAt(); - m_parentGroup.ScheduleGroupForTerseUpdate(); - } + m_parentGroup.ScheduleGroupForTerseUpdate(); + } /// /// Set the text displayed for this part. diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 277081abd1..85454258ed 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1851,7 +1851,7 @@ namespace OpenSim.Region.Framework.Scenes if (collisionPoint.ApproxEquals(m_requestedSitOffset + part.AbsolutePosition, 0.2f)) { SitRaycastFindEdge(collisionPoint, normal); - m_log.DebugFormat("[SIT]: Raycast Avatar Position succeeded at point: {0}, normal:{1}", collisionPoint, normal ); + m_log.DebugFormat("[SIT]: Raycast Avatar Position succeeded at point: {0}, normal:{1}", collisionPoint, normal); } else { diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index e368c2ae33..fd2329409e 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -82,7 +82,7 @@ namespace OpenSim.Region.Framework.Scenes private int m_fps = 0; // saved last reported value so there is something available for llGetRegionFPS private float lastReportedSimFPS = 0; - private float[] lastReportedSimStats = new float[21]; + private float[] lastReportedSimStats = new float[21]; private float m_pfps = 0; private int m_agentUpdates = 0; @@ -263,11 +263,11 @@ namespace OpenSim.Region.Framework.Scenes sb[20].StatID = (uint)Stats.ScriptLinesPerSecond; sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor; - - for (int i = 0; i < 21; i++) - { - lastReportedSimStats[i] = sb[i].StatValue; - } + + for (int i = 0; i < 21; i++) + { + lastReportedSimStats[i] = sb[i].StatValue; + } SimStats simStats = new SimStats( @@ -447,11 +447,11 @@ namespace OpenSim.Region.Framework.Scenes { return lastReportedSimFPS; } - - public float[] getLastReportedSimStats() - { - return lastReportedSimStats; - } + + public float[] getLastReportedSimStats() + { + return lastReportedSimStats; + } public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) { diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6c2b94a7b5..5d97a12868 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -837,24 +837,24 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index 9d6466714e..30580e7919 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs @@ -179,8 +179,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// /// The message to send to the user void Say(string msg); - - void Say(string msg,int channel); + + void Say(string msg,int channel); //// /// Grants access to the objects inventory diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 9596d13a32..31f28e0355 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -264,7 +264,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (CanEdit()) { GetSOP().SitTargetPosition = value; - } + } } } @@ -276,7 +276,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (CanEdit()) { GetSOP().SitName = value; - } + } } } @@ -288,7 +288,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (CanEdit()) { GetSOP().TouchName = value; - } + } } } @@ -384,7 +384,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule m_rootScene.SimChat(msg, ChatTypeEnum.Say, sop.AbsolutePosition, sop.Name, sop.UUID, false); } - public void Say(string msg,int channel) + public void Say(string msg,int channel) { if (!CanEdit()) return; @@ -392,7 +392,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule SceneObjectPart sop = GetSOP(); m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); } - + #endregion diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs index 82020cb4cc..c7cd37b2df 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs @@ -149,7 +149,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security); e.Text = chat.Message; e.Channel = chat.Channel; - + _OnChat(this, e); return; } @@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); e.Text = chat.Message; e.Channel = chat.Channel; - + _OnChat(this, e); return; } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index da7f018e4a..e3392c83ee 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -381,24 +381,24 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event PlacesQuery OnPlacesQuery; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index f411dd7a93..31366db75b 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -305,22 +305,22 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override Quaternion APIDTarget { - set { return; } + set { return; } } public override bool APIDActive { - set { return; } + set { return; } } public override float APIDStrength { - set { return; } + set { return; } } public override float APIDDamping { - set { return; } + set { return; } } public override void SubscribeEvents(int ms) diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs index 02328b5918..97eb6a2e5e 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs @@ -623,22 +623,22 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin public override Quaternion APIDTarget { - set { return; } + set { return; } } public override bool APIDActive { - set { return; } + set { return; } } public override float APIDStrength { - set { return; } + set { return; } } public override float APIDDamping { - set { return; } + set { return; } } /// diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 10b153d25e..9c192ede80 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -243,7 +243,7 @@ namespace OpenSim.Region.Physics.Manager public abstract PIDHoverType PIDHoverType { set;} public abstract float PIDHoverTau { set;} - // For RotLookAt + // For RotLookAt public abstract Quaternion APIDTarget { set;} public abstract bool APIDActive { set;} public abstract float APIDStrength { set;} diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs index 39cdc0ff62..008070b687 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs @@ -32,11 +32,11 @@ * ODEDynamics.cs contains methods dealing with Prim Physical motion * (dynamics) and the associated settings. Old Linear and angular * motors for dynamic motion have been replace with MoveLinear() - * and MoveAngular(); 'Physical' is used only to switch ODE dynamic + * and MoveAngular(); 'Physical' is used only to switch ODE dynamic * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_ is to * switch between 'VEHICLE' parameter use and general dynamics * settings use. - */ + */ using System; using System.Collections.Generic; @@ -53,7 +53,7 @@ namespace OpenSim.Region.Physics.OdePlugin public class ODEDynamics { public Vehicle Type - { + { get { return m_type; } } @@ -62,14 +62,14 @@ namespace OpenSim.Region.Physics.OdePlugin get { return m_body; } } - private int frcount = 0; // Used to limit dynamics debug output to - // every 100th frame + private int frcount = 0; // Used to limit dynamics debug output to + // every 100th frame // private OdeScene m_parentScene = null; private IntPtr m_body = IntPtr.Zero; // private IntPtr m_jointGroup = IntPtr.Zero; // private IntPtr m_aMotor = IntPtr.Zero; - + // Vehicle properties private Vehicle m_type = Vehicle.TYPE_NONE; // If a 'VEHICLE', and what kind @@ -82,7 +82,7 @@ namespace OpenSim.Region.Physics.OdePlugin // HOVER_UP_ONLY // LIMIT_MOTOR_UP // LIMIT_ROLL_ONLY - + // Linear properties private Vector3 m_linearMotorDirection = Vector3.Zero; // velocity requested by LSL, decayed by time private Vector3 m_linearMotorDirectionLASTSET = Vector3.Zero; // velocity requested by LSL @@ -91,47 +91,43 @@ namespace OpenSim.Region.Physics.OdePlugin private float m_linearMotorDecayTimescale = 0; private float m_linearMotorTimescale = 0; private Vector3 m_lastLinearVelocityVector = Vector3.Zero; - // private bool m_LinearMotorSetLastFrame = false; + // private bool m_LinearMotorSetLastFrame = false; // private Vector3 m_linearMotorOffset = Vector3.Zero; - + //Angular properties - private Vector3 m_angularMotorDirection = Vector3.Zero; // angular velocity requested by LSL motor + private Vector3 m_angularMotorDirection = Vector3.Zero; // angular velocity requested by LSL motor private int m_angularMotorApply = 0; // application frame counter - private Vector3 m_angularMotorVelocity = Vector3.Zero; // current angular motor velocity + private Vector3 m_angularMotorVelocity = Vector3.Zero; // current angular motor velocity private float m_angularMotorTimescale = 0; // motor angular velocity ramp up rate private float m_angularMotorDecayTimescale = 0; // motor angular velocity decay rate private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate private Vector3 m_lastAngularVelocity = Vector3.Zero; // what was last applied to body // private Vector3 m_lastVertAttractor = Vector3.Zero; // what VA was last applied to body - //Deflection properties + //Deflection properties // private float m_angularDeflectionEfficiency = 0; // private float m_angularDeflectionTimescale = 0; // private float m_linearDeflectionEfficiency = 0; // private float m_linearDeflectionTimescale = 0; - + //Banking properties // private float m_bankingEfficiency = 0; // private float m_bankingMix = 0; // private float m_bankingTimescale = 0; - + //Hover and Buoyancy properties private float m_VhoverHeight = 0f; // private float m_VhoverEfficiency = 0f; private float m_VhoverTimescale = 0f; - private float m_VhoverTargetHeight = -1.0f; // if <0 then no hover, else its the current target height + private float m_VhoverTargetHeight = -1.0f; // if <0 then no hover, else its the current target height private float m_VehicleBuoyancy = 0f; //KF: m_VehicleBuoyancy is set by VEHICLE_BUOYANCY for a vehicle. - // Modifies gravity. Slider between -1 (double-gravity) and 1 (full anti-gravity) - // KF: So far I have found no good method to combine a script-requested .Z velocity and gravity. - // Therefore only m_VehicleBuoyancy=1 (0g) will use the script-requested .Z velocity. - - //Attractor properties + // Modifies gravity. Slider between -1 (double-gravity) and 1 (full anti-gravity) + // KF: So far I have found no good method to combine a script-requested .Z velocity and gravity. + // Therefore only m_VehicleBuoyancy=1 (0g) will use the script-requested .Z velocity. + + //Attractor properties private float m_verticalAttractionEfficiency = 1.0f; // damped private float m_verticalAttractionTimescale = 500f; // Timescale > 300 means no vert attractor. - - - - internal void ProcessFloatVehicleParam(Vehicle pParam, float pValue) { @@ -166,13 +162,13 @@ namespace OpenSim.Region.Physics.OdePlugin // m_bankingTimescale = pValue; break; case Vehicle.BUOYANCY: - if (pValue < -1f) pValue = -1f; - if (pValue > 1f) pValue = 1f; + if (pValue < -1f) pValue = -1f; + if (pValue > 1f) pValue = 1f; m_VehicleBuoyancy = pValue; break; // case Vehicle.HOVER_EFFICIENCY: -// if (pValue < 0f) pValue = 0f; -// if (pValue > 1f) pValue = 1f; +// if (pValue < 0f) pValue = 0f; +// if (pValue > 1f) pValue = 1f; // m_VhoverEfficiency = pValue; // break; case Vehicle.HOVER_HEIGHT: @@ -199,7 +195,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_linearMotorTimescale = pValue; break; case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY: - if (pValue < 0.1f) pValue = 0.1f; // Less goes unstable + if (pValue < 0.1f) pValue = 0.1f; // Less goes unstable if (pValue > 1.0f) pValue = 1.0f; m_verticalAttractionEfficiency = pValue; break; @@ -207,8 +203,8 @@ namespace OpenSim.Region.Physics.OdePlugin if (pValue < 0.01f) pValue = 0.01f; m_verticalAttractionTimescale = pValue; break; - - // These are vector properties but the engine lets you use a single float value to + + // These are vector properties but the engine lets you use a single float value to // set all of the components to the same value case Vehicle.ANGULAR_FRICTION_TIMESCALE: m_angularFrictionTimescale = new Vector3(pValue, pValue, pValue); @@ -229,7 +225,6 @@ namespace OpenSim.Region.Physics.OdePlugin break; } - }//end ProcessFloatVehicleParam internal void ProcessVectorVehicleParam(Vehicle pParam, Vector3 pValue) @@ -242,12 +237,12 @@ namespace OpenSim.Region.Physics.OdePlugin case Vehicle.ANGULAR_MOTOR_DIRECTION: m_angularMotorDirection = new Vector3(pValue.X, pValue.Y, pValue.Z); // Limit requested angular speed to 2 rps= 4 pi rads/sec - if(m_angularMotorDirection.X > 12.56f) m_angularMotorDirection.X = 12.56f; - if(m_angularMotorDirection.X < - 12.56f) m_angularMotorDirection.X = - 12.56f; - if(m_angularMotorDirection.Y > 12.56f) m_angularMotorDirection.Y = 12.56f; - if(m_angularMotorDirection.Y < - 12.56f) m_angularMotorDirection.Y = - 12.56f; - if(m_angularMotorDirection.Z > 12.56f) m_angularMotorDirection.Z = 12.56f; - if(m_angularMotorDirection.Z < - 12.56f) m_angularMotorDirection.Z = - 12.56f; + if (m_angularMotorDirection.X > 12.56f) m_angularMotorDirection.X = 12.56f; + if (m_angularMotorDirection.X < - 12.56f) m_angularMotorDirection.X = - 12.56f; + if (m_angularMotorDirection.Y > 12.56f) m_angularMotorDirection.Y = 12.56f; + if (m_angularMotorDirection.Y < - 12.56f) m_angularMotorDirection.Y = - 12.56f; + if (m_angularMotorDirection.Z > 12.56f) m_angularMotorDirection.Z = 12.56f; + if (m_angularMotorDirection.Z < - 12.56f) m_angularMotorDirection.Z = - 12.56f; m_angularMotorApply = 10; break; case Vehicle.LINEAR_FRICTION_TIMESCALE: @@ -261,7 +256,6 @@ namespace OpenSim.Region.Physics.OdePlugin // m_linearMotorOffset = new Vector3(pValue.X, pValue.Y, pValue.Z); break; } - }//end ProcessVectorVehicleParam internal void ProcessRotationVehicleParam(Vehicle pParam, Quaternion pValue) @@ -272,12 +266,11 @@ namespace OpenSim.Region.Physics.OdePlugin // m_referenceFrame = pValue; break; } - }//end ProcessRotationVehicleParam internal void ProcessTypeChange(Vehicle pType) { - // Set Defaults For Type + // Set Defaults For Type m_type = pType; switch (pType) { @@ -357,8 +350,8 @@ namespace OpenSim.Region.Physics.OdePlugin // m_bankingMix = 0.8f; // m_bankingTimescale = 1; // m_referenceFrame = Quaternion.Identity; - m_flags &= ~(VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.LIMIT_ROLL_ONLY | - VehicleFlag.HOVER_GLOBAL_HEIGHT | VehicleFlag.HOVER_UP_ONLY); + m_flags &= ~(VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.LIMIT_ROLL_ONLY | + VehicleFlag.HOVER_GLOBAL_HEIGHT | VehicleFlag.HOVER_UP_ONLY); m_flags |= (VehicleFlag.NO_DEFLECTION_UP | VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.LIMIT_MOTOR_UP); break; @@ -432,24 +425,25 @@ namespace OpenSim.Region.Physics.OdePlugin { if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) return; - frcount++; // used to limit debug comment output + frcount++; // used to limit debug comment output if (frcount > 100) frcount = 0; - MoveLinear(pTimestep, pParentScene); + MoveLinear(pTimestep, pParentScene); MoveAngular(pTimestep); }// end Step private void MoveLinear(float pTimestep, OdeScene _pParentScene) { - if (!m_linearMotorDirection.ApproxEquals(Vector3.Zero, 0.01f)) // requested m_linearMotorDirection is significant + if (!m_linearMotorDirection.ApproxEquals(Vector3.Zero, 0.01f)) // requested m_linearMotorDirection is significant { - if(!d.BodyIsEnabled (Body)) d.BodyEnable (Body); + if (!d.BodyIsEnabled(Body)) + d.BodyEnable(Body); // add drive to body Vector3 addAmount = m_linearMotorDirection/(m_linearMotorTimescale/pTimestep); - m_lastLinearVelocityVector += (addAmount*10); // lastLinearVelocityVector is the current body velocity vector? - + m_lastLinearVelocityVector += (addAmount*10); // lastLinearVelocityVector is the current body velocity vector? + // This will work temporarily, but we really need to compare speed on an axis // KF: Limit body velocity to applied velocity? if (Math.Abs(m_lastLinearVelocityVector.X) > Math.Abs(m_linearMotorDirectionLASTSET.X)) @@ -458,7 +452,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_lastLinearVelocityVector.Y = m_linearMotorDirectionLASTSET.Y; if (Math.Abs(m_lastLinearVelocityVector.Z) > Math.Abs(m_linearMotorDirectionLASTSET.Z)) m_lastLinearVelocityVector.Z = m_linearMotorDirectionLASTSET.Z; - + // decay applied velocity Vector3 decayfraction = ((Vector3.One/(m_linearMotorDecayTimescale/pTimestep))); //Console.WriteLine("decay: " + decayfraction); @@ -466,194 +460,192 @@ namespace OpenSim.Region.Physics.OdePlugin //Console.WriteLine("actual: " + m_linearMotorDirection); } else - { // requested is not significant - // if what remains of applied is small, zero it. - if (m_lastLinearVelocityVector.ApproxEquals(Vector3.Zero, 0.01f)) - m_lastLinearVelocityVector = Vector3.Zero; - } - - - // convert requested object velocity to world-referenced vector + { // requested is not significant + // if what remains of applied is small, zero it. + if (m_lastLinearVelocityVector.ApproxEquals(Vector3.Zero, 0.01f)) + m_lastLinearVelocityVector = Vector3.Zero; + } + + // convert requested object velocity to world-referenced vector m_dir = m_lastLinearVelocityVector; d.Quaternion rot = d.BodyGetQuaternion(Body); - Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object - m_dir *= rotq; // apply obj rotation to velocity vector + Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object + m_dir *= rotq; // apply obj rotation to velocity vector - // add Gravity andBuoyancy - // KF: So far I have found no good method to combine a script-requested - // .Z velocity and gravity. Therefore only 0g will used script-requested - // .Z velocity. >0g (m_VehicleBuoyancy < 1) will used modified gravity only. + // add Gravity andBuoyancy + // KF: So far I have found no good method to combine a script-requested + // .Z velocity and gravity. Therefore only 0g will used script-requested + // .Z velocity. >0g (m_VehicleBuoyancy < 1) will used modified gravity only. Vector3 grav = Vector3.Zero; - if(m_VehicleBuoyancy < 1.0f) - { - // There is some gravity, make a gravity force vector - // that is applied after object velocity. - d.Mass objMass; - d.BodyGetMass(Body, out objMass); - // m_VehicleBuoyancy: -1=2g; 0=1g; 1=0g; - grav.Z = _pParentScene.gravityz * objMass.mass * (1f - m_VehicleBuoyancy); - // Preserve the current Z velocity - d.Vector3 vel_now = d.BodyGetLinearVel(Body); - m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity - } // else its 1.0, no gravity. - - // Check if hovering - if( (m_flags & (VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.HOVER_GLOBAL_HEIGHT)) != 0) - { - // We should hover, get the target height - d.Vector3 pos = d.BodyGetPosition(Body); - if((m_flags & VehicleFlag.HOVER_WATER_ONLY) == VehicleFlag.HOVER_WATER_ONLY) - { - m_VhoverTargetHeight = _pParentScene.GetWaterLevel() + m_VhoverHeight; - } - else if((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) == VehicleFlag.HOVER_TERRAIN_ONLY) - { - m_VhoverTargetHeight = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y) + m_VhoverHeight; - } - else if((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == VehicleFlag.HOVER_GLOBAL_HEIGHT) - { - m_VhoverTargetHeight = m_VhoverHeight; - } - - if((m_flags & VehicleFlag.HOVER_UP_ONLY) == VehicleFlag.HOVER_UP_ONLY) - { - // If body is aready heigher, use its height as target height - if(pos.Z > m_VhoverTargetHeight) m_VhoverTargetHeight = pos.Z; - } - -// m_VhoverEfficiency = 0f; // 0=boucy, 1=Crit.damped -// m_VhoverTimescale = 0f; // time to acheive height -// pTimestep is time since last frame,in secs - float herr0 = pos.Z - m_VhoverTargetHeight; - // Replace Vertical speed with correction figure if significant - if(Math.Abs(herr0) > 0.01f ) - { - d.Mass objMass; - d.BodyGetMass(Body, out objMass); - m_dir.Z = - ( (herr0 * pTimestep * 50.0f) / m_VhoverTimescale); - //KF: m_VhoverEfficiency is not yet implemented - } - else - { - m_dir.Z = 0f; - } - } - - // Apply velocity - d.BodySetLinearVel(Body, m_dir.X, m_dir.Y, m_dir.Z); + if (m_VehicleBuoyancy < 1.0f) + { + // There is some gravity, make a gravity force vector + // that is applied after object velocity. + d.Mass objMass; + d.BodyGetMass(Body, out objMass); + // m_VehicleBuoyancy: -1=2g; 0=1g; 1=0g; + grav.Z = _pParentScene.gravityz * objMass.mass * (1f - m_VehicleBuoyancy); + // Preserve the current Z velocity + d.Vector3 vel_now = d.BodyGetLinearVel(Body); + m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity + } // else its 1.0, no gravity. + + // Check if hovering + if ((m_flags & (VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.HOVER_GLOBAL_HEIGHT)) != 0) + { + // We should hover, get the target height + d.Vector3 pos = d.BodyGetPosition(Body); + if ((m_flags & VehicleFlag.HOVER_WATER_ONLY) == VehicleFlag.HOVER_WATER_ONLY) + { + m_VhoverTargetHeight = _pParentScene.GetWaterLevel() + m_VhoverHeight; + } + else if ((m_flags & VehicleFlag.HOVER_TERRAIN_ONLY) == VehicleFlag.HOVER_TERRAIN_ONLY) + { + m_VhoverTargetHeight = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y) + m_VhoverHeight; + } + else if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == VehicleFlag.HOVER_GLOBAL_HEIGHT) + { + m_VhoverTargetHeight = m_VhoverHeight; + } + + if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == VehicleFlag.HOVER_UP_ONLY) + { + // If body is aready heigher, use its height as target height + if (pos.Z > m_VhoverTargetHeight) m_VhoverTargetHeight = pos.Z; + } + +// m_VhoverEfficiency = 0f; // 0=boucy, 1=Crit.damped +// m_VhoverTimescale = 0f; // time to acheive height +// pTimestep is time since last frame,in secs + float herr0 = pos.Z - m_VhoverTargetHeight; + // Replace Vertical speed with correction figure if significant + if (Math.Abs(herr0) > 0.01f) + { + d.Mass objMass; + d.BodyGetMass(Body, out objMass); + m_dir.Z = - ((herr0 * pTimestep * 50.0f) / m_VhoverTimescale); + //KF: m_VhoverEfficiency is not yet implemented + } + else + { + m_dir.Z = 0f; + } + } + + // Apply velocity + d.BodySetLinearVel(Body, m_dir.X, m_dir.Y, m_dir.Z); // apply gravity force - d.BodyAddForce(Body, grav.X, grav.Y, grav.Z); + d.BodyAddForce(Body, grav.X, grav.Y, grav.Z); - // apply friction + // apply friction Vector3 decayamount = Vector3.One / (m_linearFrictionTimescale / pTimestep); m_lastLinearVelocityVector -= m_lastLinearVelocityVector * decayamount; } // end MoveLinear() - + private void MoveAngular(float pTimestep) { - /* - private Vector3 m_angularMotorDirection = Vector3.Zero; // angular velocity requested by LSL motor - private int m_angularMotorApply = 0; // application frame counter - private float m_angularMotorVelocity = 0; // current angular motor velocity (ramps up and down) - private float m_angularMotorTimescale = 0; // motor angular velocity ramp up rate - private float m_angularMotorDecayTimescale = 0; // motor angular velocity decay rate - private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate - private Vector3 m_lastAngularVelocity = Vector3.Zero; // what was last applied to body - */ - - // Get what the body is doing, this includes 'external' influences - d.Vector3 angularVelocity = d.BodyGetAngularVel(Body); - // Vector3 angularVelocity = Vector3.Zero; - - if (m_angularMotorApply > 0) - { - // ramp up to new value - // current velocity += error / ( time to get there / step interval ) - // requested speed - last motor speed - m_angularMotorVelocity.X += (m_angularMotorDirection.X - m_angularMotorVelocity.X) / (m_angularMotorTimescale / pTimestep); - m_angularMotorVelocity.Y += (m_angularMotorDirection.Y - m_angularMotorVelocity.Y) / (m_angularMotorTimescale / pTimestep); - m_angularMotorVelocity.Z += (m_angularMotorDirection.Z - m_angularMotorVelocity.Z) / (m_angularMotorTimescale / pTimestep); + /* + private Vector3 m_angularMotorDirection = Vector3.Zero; // angular velocity requested by LSL motor + private int m_angularMotorApply = 0; // application frame counter + private float m_angularMotorVelocity = 0; // current angular motor velocity (ramps up and down) + private float m_angularMotorTimescale = 0; // motor angular velocity ramp up rate + private float m_angularMotorDecayTimescale = 0; // motor angular velocity decay rate + private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate + private Vector3 m_lastAngularVelocity = Vector3.Zero; // what was last applied to body + */ - m_angularMotorApply--; // This is done so that if script request rate is less than phys frame rate the expected - // velocity may still be acheived. - } - else - { - // no motor recently applied, keep the body velocity - /* m_angularMotorVelocity.X = angularVelocity.X; - m_angularMotorVelocity.Y = angularVelocity.Y; - m_angularMotorVelocity.Z = angularVelocity.Z; */ - - // and decay the velocity - m_angularMotorVelocity -= m_angularMotorVelocity / (m_angularMotorDecayTimescale / pTimestep); - } // end motor section - + // Get what the body is doing, this includes 'external' influences + d.Vector3 angularVelocity = d.BodyGetAngularVel(Body); + // Vector3 angularVelocity = Vector3.Zero; + + if (m_angularMotorApply > 0) + { + // ramp up to new value + // current velocity += error / (time to get there / step interval) + // requested speed - last motor speed + m_angularMotorVelocity.X += (m_angularMotorDirection.X - m_angularMotorVelocity.X) / (m_angularMotorTimescale / pTimestep); + m_angularMotorVelocity.Y += (m_angularMotorDirection.Y - m_angularMotorVelocity.Y) / (m_angularMotorTimescale / pTimestep); + m_angularMotorVelocity.Z += (m_angularMotorDirection.Z - m_angularMotorVelocity.Z) / (m_angularMotorTimescale / pTimestep); + + m_angularMotorApply--; // This is done so that if script request rate is less than phys frame rate the expected + // velocity may still be acheived. + } + else + { + // no motor recently applied, keep the body velocity + /* m_angularMotorVelocity.X = angularVelocity.X; + m_angularMotorVelocity.Y = angularVelocity.Y; + m_angularMotorVelocity.Z = angularVelocity.Z; */ + + // and decay the velocity + m_angularMotorVelocity -= m_angularMotorVelocity / (m_angularMotorDecayTimescale / pTimestep); + } // end motor section // Vertical attractor section - Vector3 vertattr = Vector3.Zero; - - if(m_verticalAttractionTimescale < 300) - { - float VAservo = 0.2f / (m_verticalAttractionTimescale * pTimestep); - // get present body rotation - d.Quaternion rot = d.BodyGetQuaternion(Body); - Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); - // make a vector pointing up - Vector3 verterr = Vector3.Zero; - verterr.Z = 1.0f; - // rotate it to Body Angle - verterr = verterr * rotq; - // verterr.X and .Y are the World error ammounts. They are 0 when there is no error (Vehicle Body is 'vertical'), and .Z will be 1. - // As the body leans to its side |.X| will increase to 1 and .Z fall to 0. As body inverts |.X| will fall and .Z will go - // negative. Similar for tilt and |.Y|. .X and .Y must be modulated to prevent a stable inverted body. - if (verterr.Z < 0.0f) - { - verterr.X = 2.0f - verterr.X; - verterr.Y = 2.0f - verterr.Y; - } - // Error is 0 (no error) to +/- 2 (max error) - // scale it by VAservo - verterr = verterr * VAservo; -//if(frcount == 0) Console.WriteLine("VAerr=" + verterr); + Vector3 vertattr = Vector3.Zero; - // As the body rotates around the X axis, then verterr.Y increases; Rotated around Y then .X increases, so - // Change Body angular velocity X based on Y, and Y based on X. Z is not changed. - vertattr.X = verterr.Y; - vertattr.Y = - verterr.X; - vertattr.Z = 0f; - - // scaling appears better usingsquare-law - float bounce = 1.0f - (m_verticalAttractionEfficiency * m_verticalAttractionEfficiency); - vertattr.X += bounce * angularVelocity.X; - vertattr.Y += bounce * angularVelocity.Y; - - } // else vertical attractor is off - - // m_lastVertAttractor = vertattr; - - // Bank section tba - // Deflection section tba - - // Sum velocities - m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection - - if (!m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) + if (m_verticalAttractionTimescale < 300) { - if(!d.BodyIsEnabled (Body)) d.BodyEnable (Body); - } - else - { - m_lastAngularVelocity = Vector3.Zero; // Reduce small value to zero. - } - - // apply friction + float VAservo = 0.2f / (m_verticalAttractionTimescale * pTimestep); + // get present body rotation + d.Quaternion rot = d.BodyGetQuaternion(Body); + Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); + // make a vector pointing up + Vector3 verterr = Vector3.Zero; + verterr.Z = 1.0f; + // rotate it to Body Angle + verterr = verterr * rotq; + // verterr.X and .Y are the World error ammounts. They are 0 when there is no error (Vehicle Body is 'vertical'), and .Z will be 1. + // As the body leans to its side |.X| will increase to 1 and .Z fall to 0. As body inverts |.X| will fall and .Z will go + // negative. Similar for tilt and |.Y|. .X and .Y must be modulated to prevent a stable inverted body. + if (verterr.Z < 0.0f) + { + verterr.X = 2.0f - verterr.X; + verterr.Y = 2.0f - verterr.Y; + } + // Error is 0 (no error) to +/- 2 (max error) + // scale it by VAservo + verterr = verterr * VAservo; +//if (frcount == 0) Console.WriteLine("VAerr=" + verterr); + + // As the body rotates around the X axis, then verterr.Y increases; Rotated around Y then .X increases, so + // Change Body angular velocity X based on Y, and Y based on X. Z is not changed. + vertattr.X = verterr.Y; + vertattr.Y = - verterr.X; + vertattr.Z = 0f; + + // scaling appears better usingsquare-law + float bounce = 1.0f - (m_verticalAttractionEfficiency * m_verticalAttractionEfficiency); + vertattr.X += bounce * angularVelocity.X; + vertattr.Y += bounce * angularVelocity.Y; + + } // else vertical attractor is off + + // m_lastVertAttractor = vertattr; + + // Bank section tba + // Deflection section tba + + // Sum velocities + m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection + + if (!m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) + { + if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); + } + else + { + m_lastAngularVelocity = Vector3.Zero; // Reduce small value to zero. + } + + // apply friction Vector3 decayamount = Vector3.One / (m_angularFrictionTimescale / pTimestep); - m_lastAngularVelocity -= m_lastAngularVelocity * decayamount; - - // Apply to the body - d.BodySetAngularVel (Body, m_lastAngularVelocity.X, m_lastAngularVelocity.Y, m_lastAngularVelocity.Z); - - } //end MoveAngular - } + m_lastAngularVelocity -= m_lastAngularVelocity * decayamount; + + // Apply to the body + d.BodySetAngularVel (Body, m_lastAngularVelocity.X, m_lastAngularVelocity.Y, m_lastAngularVelocity.Z); + + } //end MoveAngular + } } diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 3eb3b280e1..973aa844d3 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1,5 +1,7 @@ -/* Copyright (c) Contributors, http://opensimulator.org/ +/* + * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -93,7 +95,7 @@ namespace OpenSim.Region.Physics.OdePlugin private float m_targetHoverHeight; private float m_groundHeight; private float m_waterHeight; - private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. + private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. // private float m_tensor = 5f; private int body_autodisable_frames = 20; @@ -294,7 +296,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_taintselected = value; m_isSelected = value; } - if(m_isSelected) disableBodySoft(); + if (m_isSelected) disableBodySoft(); } } @@ -302,7 +304,7 @@ namespace OpenSim.Region.Physics.OdePlugin { prev_geom = prim_geom; prim_geom = geom; -//Console.WriteLine("SetGeom to " + prim_geom + " for " + m_primName); +//Console.WriteLine("SetGeom to " + prim_geom + " for " + m_primName); if (prim_geom != IntPtr.Zero) { d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); @@ -314,7 +316,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (_parent != null && _parent is OdePrim) { OdePrim parent = (OdePrim)_parent; -//Console.WriteLine("SetGeom calls ChildSetGeom"); +//Console.WriteLine("SetGeom calls ChildSetGeom"); parent.ChildSetGeom(this); } } @@ -331,7 +333,7 @@ namespace OpenSim.Region.Physics.OdePlugin { d.BodyEnable(Body); if (m_vehicle.Type != Vehicle.TYPE_NONE) - m_vehicle.Enable(Body, _parent_scene); + m_vehicle.Enable(Body, _parent_scene); } m_disabled = false; @@ -376,7 +378,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.BodySetAutoDisableSteps(Body, body_autodisable_frames); // disconnect from world gravity so we can apply buoyancy - d.BodySetGravityMode (Body, false); + d.BodySetGravityMode (Body, false); m_interpenetrationcount = 0; m_collisionscore = 0; @@ -872,7 +874,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void ProcessTaints(float timestep) { -//Console.WriteLine("ProcessTaints for " + m_primName ); +//Console.WriteLine("ProcessTaints for " + m_primName); if (m_taintadd) { changeadd(timestep); @@ -880,24 +882,24 @@ namespace OpenSim.Region.Physics.OdePlugin if (prim_geom != IntPtr.Zero) { - if (!_position.ApproxEquals(m_taintposition, 0f)) - changemove(timestep); + if (!_position.ApproxEquals(m_taintposition, 0f)) + changemove(timestep); - if (m_taintrot != _orientation) - { - if(childPrim && IsPhysical) // For physical child prim... - { - rotate(timestep); - // KF: ODE will also rotate the parent prim! - // so rotate the root back to where it was - OdePrim parent = (OdePrim)_parent; - parent.rotate(timestep); + if (m_taintrot != _orientation) + { + if (childPrim && IsPhysical) // For physical child prim... + { + rotate(timestep); + // KF: ODE will also rotate the parent prim! + // so rotate the root back to where it was + OdePrim parent = (OdePrim)_parent; + parent.rotate(timestep); } else { - //Just rotate the prim - rotate(timestep); - } + //Just rotate the prim + rotate(timestep); + } } // @@ -1006,7 +1008,7 @@ namespace OpenSim.Region.Physics.OdePlugin // destroy link else if (_parent != null && m_taintparent == null) { -//Console.WriteLine(" changelink B"); +//Console.WriteLine(" changelink B"); if (_parent is OdePrim) { @@ -1033,7 +1035,7 @@ namespace OpenSim.Region.Physics.OdePlugin // prim is the child public void ParentPrim(OdePrim prim) { -//Console.WriteLine("ParentPrim " + m_primName); +//Console.WriteLine("ParentPrim " + m_primName); if (this.m_localID != prim.m_localID) { if (Body == IntPtr.Zero) @@ -1047,7 +1049,7 @@ namespace OpenSim.Region.Physics.OdePlugin { if (!childrenPrim.Contains(prim)) { -//Console.WriteLine("childrenPrim.Add " + prim); +//Console.WriteLine("childrenPrim.Add " + prim); childrenPrim.Add(prim); foreach (OdePrim prm in childrenPrim) @@ -1080,7 +1082,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_log.Warn("[PHYSICS]: Unable to link one of the linkset elements. No geom yet"); continue; } -//Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + m_primName); +//Console.WriteLine(" GeomSetCategoryBits 1: " + prm.prim_geom + " - " + (int)prm.m_collisionCategories + " for " + m_primName); d.GeomSetCategoryBits(prm.prim_geom, (int)prm.m_collisionCategories); d.GeomSetCollideBits(prm.prim_geom, (int)prm.m_collisionFlags); @@ -1128,7 +1130,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_collisionCategories |= CollisionCategories.Body; m_collisionFlags |= (CollisionCategories.Land | CollisionCategories.Wind); -//Console.WriteLine("GeomSetCategoryBits 2: " + prim_geom + " - " + (int)m_collisionCategories + " for " + m_primName); +//Console.WriteLine("GeomSetCategoryBits 2: " + prim_geom + " - " + (int)m_collisionCategories + " for " + m_primName); d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); //Console.WriteLine(" Post GeomSetCategoryBits 2"); d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); @@ -1203,7 +1205,7 @@ namespace OpenSim.Region.Physics.OdePlugin { foreach (OdePrim prm in childrenPrim) { -//Console.WriteLine("ChildSetGeom calls ParentPrim"); +//Console.WriteLine("ChildSetGeom calls ParentPrim"); ParentPrim(prm); } } @@ -1230,7 +1232,7 @@ namespace OpenSim.Region.Physics.OdePlugin lock (childrenPrim) { - //Console.WriteLine("childrenPrim.Remove " + odePrim); + //Console.WriteLine("childrenPrim.Remove " + odePrim); childrenPrim.Remove(odePrim); } @@ -1248,7 +1250,7 @@ namespace OpenSim.Region.Physics.OdePlugin { foreach (OdePrim prm in childrenPrim) { -//Console.WriteLine("ChildDelink calls ParentPrim"); +//Console.WriteLine("ChildDelink calls ParentPrim"); ParentPrim(prm); } } @@ -1350,7 +1352,7 @@ namespace OpenSim.Region.Physics.OdePlugin public void CreateGeom(IntPtr m_targetSpace, IMesh _mesh) { -//Console.WriteLine("CreateGeom:"); +//Console.WriteLine("CreateGeom:"); if (_mesh != null) { setMesh(_parent_scene, _mesh); @@ -1381,7 +1383,7 @@ namespace OpenSim.Region.Physics.OdePlugin _parent_scene.waitForSpaceUnlock(m_targetSpace); try { -//Console.WriteLine(" CreateGeom 2"); +//Console.WriteLine(" CreateGeom 2"); SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } catch (AccessViolationException) @@ -1397,7 +1399,7 @@ namespace OpenSim.Region.Physics.OdePlugin _parent_scene.waitForSpaceUnlock(m_targetSpace); try { -//Console.WriteLine(" CreateGeom 3"); +//Console.WriteLine(" CreateGeom 3"); SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } catch (AccessViolationException) @@ -1414,7 +1416,7 @@ namespace OpenSim.Region.Physics.OdePlugin _parent_scene.waitForSpaceUnlock(m_targetSpace); try { -//Console.WriteLine(" CreateGeom 4"); +//Console.WriteLine(" CreateGeom 4"); SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } catch (AccessViolationException) @@ -1451,7 +1453,7 @@ namespace OpenSim.Region.Physics.OdePlugin lock (_parent_scene.OdeLock) { -//Console.WriteLine("changeadd 1"); +//Console.WriteLine("changeadd 1"); CreateGeom(m_targetSpace, _mesh); if (prim_geom != IntPtr.Zero) @@ -1508,7 +1510,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (Body != (IntPtr)0 && odParent.Body != (IntPtr)0 && Body != odParent.Body) { // KF: Fixed Joints were removed? Anyway - this Console.WriteLine does not show up, so routine is not used?? -Console.WriteLine(" JointCreateFixed"); +Console.WriteLine(" JointCreateFixed"); m_linkJoint = d.JointCreateFixed(_parent_scene.world, _linkJointGroup); d.JointAttach(m_linkJoint, Body, odParent.Body); d.JointSetFixed(m_linkJoint); @@ -1562,244 +1564,244 @@ Console.WriteLine(" JointCreateFixed"); float fz = 0; - if (IsPhysical && (Body != IntPtr.Zero) && !m_isSelected && !childPrim) // KF: Only move root prims. + if (IsPhysical && (Body != IntPtr.Zero) && !m_isSelected && !childPrim) // KF: Only move root prims. { - if (m_vehicle.Type != Vehicle.TYPE_NONE) - { - // 'VEHICLES' are dealt with in ODEDynamics.cs - m_vehicle.Step(timestep, _parent_scene); - } - else - { -//Console.WriteLine("Move " + m_primName); - if(!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 - // NON-'VEHICLES' are dealt with here - if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) - { - d.Vector3 avel2 = d.BodyGetAngularVel(Body); - if (m_angularlock.X == 1) - avel2.X = 0; - if (m_angularlock.Y == 1) - avel2.Y = 0; - if (m_angularlock.Z == 1) - avel2.Z = 0; - d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); - } - //float PID_P = 900.0f; + if (m_vehicle.Type != Vehicle.TYPE_NONE) + { + // 'VEHICLES' are dealt with in ODEDynamics.cs + m_vehicle.Step(timestep, _parent_scene); + } + else + { +//Console.WriteLine("Move " + m_primName); + if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 + // NON-'VEHICLES' are dealt with here + if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) + { + d.Vector3 avel2 = d.BodyGetAngularVel(Body); + if (m_angularlock.X == 1) + avel2.X = 0; + if (m_angularlock.Y == 1) + avel2.Y = 0; + if (m_angularlock.Z == 1) + avel2.Z = 0; + d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); + } + //float PID_P = 900.0f; - float m_mass = CalculateMass(); + float m_mass = CalculateMass(); -// fz = 0f; +// fz = 0f; //m_log.Info(m_collisionFlags.ToString()); - - //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. - // would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ?? - // m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up - // gravityz multiplier = 1 - m_buoyancy - fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; + + //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. + // would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ?? + // m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up + // gravityz multiplier = 1 - m_buoyancy + fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; - if (m_usePID) - { -//Console.WriteLine("PID " + m_primName); - // KF - this is for object move? eg. llSetPos() ? - //if (!d.BodyIsEnabled(Body)) - //d.BodySetForce(Body, 0f, 0f, 0f); - // If we're using the PID controller, then we have no gravity - //fz = (-1 * _parent_scene.gravityz) * m_mass; //KF: ?? Prims have no global gravity,so simply... - fz = 0f; + if (m_usePID) + { +//Console.WriteLine("PID " + m_primName); + // KF - this is for object move? eg. llSetPos() ? + //if (!d.BodyIsEnabled(Body)) + //d.BodySetForce(Body, 0f, 0f, 0f); + // If we're using the PID controller, then we have no gravity + //fz = (-1 * _parent_scene.gravityz) * m_mass; //KF: ?? Prims have no global gravity,so simply... + fz = 0f; - // no lock; for now it's only called from within Simulate() - - // If the PID Controller isn't active then we set our force - // calculating base velocity to the current position + // no lock; for now it's only called from within Simulate() + + // If the PID Controller isn't active then we set our force + // calculating base velocity to the current position - if ((m_PIDTau < 1) && (m_PIDTau != 0)) - { - //PID_G = PID_G / m_PIDTau; - m_PIDTau = 1; - } - - if ((PID_G - m_PIDTau) <= 0) - { - PID_G = m_PIDTau + 1; - } - //PidStatus = true; + if ((m_PIDTau < 1) && (m_PIDTau != 0)) + { + //PID_G = PID_G / m_PIDTau; + m_PIDTau = 1; + } + + if ((PID_G - m_PIDTau) <= 0) + { + PID_G = m_PIDTau + 1; + } + //PidStatus = true; - // PhysicsVector vec = new PhysicsVector(); - d.Vector3 vel = d.BodyGetLinearVel(Body); + // PhysicsVector vec = new PhysicsVector(); + d.Vector3 vel = d.BodyGetLinearVel(Body); - d.Vector3 pos = d.BodyGetPosition(Body); - _target_velocity = + d.Vector3 pos = d.BodyGetPosition(Body); + _target_velocity = new Vector3( - (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), - (m_PIDTarget.Y - pos.Y) * ((PID_G - m_PIDTau) * timestep), - (m_PIDTarget.Z - pos.Z) * ((PID_G - m_PIDTau) * timestep) - ); + (m_PIDTarget.X - pos.X) * ((PID_G - m_PIDTau) * timestep), + (m_PIDTarget.Y - pos.Y) * ((PID_G - m_PIDTau) * timestep), + (m_PIDTarget.Z - pos.Z) * ((PID_G - m_PIDTau) * timestep) + ); - // if velocity is zero, use position control; otherwise, velocity control + // if velocity is zero, use position control; otherwise, velocity control - if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f)) - { - // keep track of where we stopped. No more slippin' & slidin' - - // We only want to deactivate the PID Controller if we think we want to have our surrogate - // react to the physics scene by moving it's position. - // Avatar to Avatar collisions - // Prim to avatar collisions + if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f)) + { + // keep track of where we stopped. No more slippin' & slidin' + + // We only want to deactivate the PID Controller if we think we want to have our surrogate + // react to the physics scene by moving it's position. + // Avatar to Avatar collisions + // Prim to avatar collisions - //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); - //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); - //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; - d.BodySetPosition(Body, m_PIDTarget.X, m_PIDTarget.Y, m_PIDTarget.Z); - d.BodySetLinearVel(Body, 0, 0, 0); - d.BodyAddForce(Body, 0, 0, fz); - return; - } - else - { - _zeroFlag = false; + //fx = (_target_velocity.X - vel.X) * (PID_D) + (_zeroPosition.X - pos.X) * (PID_P * 2); + //fy = (_target_velocity.Y - vel.Y) * (PID_D) + (_zeroPosition.Y - pos.Y) * (PID_P * 2); + //fz = fz + (_target_velocity.Z - vel.Z) * (PID_D) + (_zeroPosition.Z - pos.Z) * PID_P; + d.BodySetPosition(Body, m_PIDTarget.X, m_PIDTarget.Y, m_PIDTarget.Z); + d.BodySetLinearVel(Body, 0, 0, 0); + d.BodyAddForce(Body, 0, 0, fz); + return; + } + else + { + _zeroFlag = false; - // We're flying and colliding with something - fx = ((_target_velocity.X) - vel.X) * (PID_D); - fy = ((_target_velocity.Y) - vel.Y) * (PID_D); - - // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; + // We're flying and colliding with something + fx = ((_target_velocity.X) - vel.X) * (PID_D); + fy = ((_target_velocity.Y) - vel.Y) * (PID_D); + + // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; - fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); - } - } // end if (m_usePID) + fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); + } + } // end if (m_usePID) - // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller - if (m_useHoverPID && !m_usePID) - { -//Console.WriteLine("Hover " + m_primName); - - // If we're using the PID controller, then we have no gravity - fz = (-1 * _parent_scene.gravityz) * m_mass; + // Hover PID Controller needs to be mutually exlusive to MoveTo PID controller + if (m_useHoverPID && !m_usePID) + { +//Console.WriteLine("Hover " + m_primName); + + // If we're using the PID controller, then we have no gravity + fz = (-1 * _parent_scene.gravityz) * m_mass; - // no lock; for now it's only called from within Simulate() + // no lock; for now it's only called from within Simulate() - // If the PID Controller isn't active then we set our force - // calculating base velocity to the current position + // If the PID Controller isn't active then we set our force + // calculating base velocity to the current position - if ((m_PIDTau < 1)) - { - PID_G = PID_G / m_PIDTau; - } + if ((m_PIDTau < 1)) + { + PID_G = PID_G / m_PIDTau; + } - if ((PID_G - m_PIDTau) <= 0) - { - PID_G = m_PIDTau + 1; - } + if ((PID_G - m_PIDTau) <= 0) + { + PID_G = m_PIDTau + 1; + } - // Where are we, and where are we headed? - d.Vector3 pos = d.BodyGetPosition(Body); - d.Vector3 vel = d.BodyGetLinearVel(Body); + // Where are we, and where are we headed? + d.Vector3 pos = d.BodyGetPosition(Body); + d.Vector3 vel = d.BodyGetLinearVel(Body); - // Non-Vehicles have a limited set of Hover options. - // determine what our target height really is based on HoverType - switch (m_PIDHoverType) - { - case PIDHoverType.Ground: - m_groundHeight = _parent_scene.GetTerrainHeightAtXY(pos.X, pos.Y); - m_targetHoverHeight = m_groundHeight + m_PIDHoverHeight; - break; - case PIDHoverType.GroundAndWater: - m_groundHeight = _parent_scene.GetTerrainHeightAtXY(pos.X, pos.Y); - m_waterHeight = _parent_scene.GetWaterLevel(); - if (m_groundHeight > m_waterHeight) - { - m_targetHoverHeight = m_groundHeight + m_PIDHoverHeight; - } - else - { - m_targetHoverHeight = m_waterHeight + m_PIDHoverHeight; - } - break; + // Non-Vehicles have a limited set of Hover options. + // determine what our target height really is based on HoverType + switch (m_PIDHoverType) + { + case PIDHoverType.Ground: + m_groundHeight = _parent_scene.GetTerrainHeightAtXY(pos.X, pos.Y); + m_targetHoverHeight = m_groundHeight + m_PIDHoverHeight; + break; + case PIDHoverType.GroundAndWater: + m_groundHeight = _parent_scene.GetTerrainHeightAtXY(pos.X, pos.Y); + m_waterHeight = _parent_scene.GetWaterLevel(); + if (m_groundHeight > m_waterHeight) + { + m_targetHoverHeight = m_groundHeight + m_PIDHoverHeight; + } + else + { + m_targetHoverHeight = m_waterHeight + m_PIDHoverHeight; + } + break; - } // end switch (m_PIDHoverType) + } // end switch (m_PIDHoverType) - _target_velocity = + _target_velocity = new Vector3(0.0f, 0.0f, - (m_targetHoverHeight - pos.Z) * ((PID_G - m_PIDHoverTau) * timestep) - ); + (m_targetHoverHeight - pos.Z) * ((PID_G - m_PIDHoverTau) * timestep) + ); - // if velocity is zero, use position control; otherwise, velocity control + // if velocity is zero, use position control; otherwise, velocity control - if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f)) - { - // keep track of where we stopped. No more slippin' & slidin' - - // We only want to deactivate the PID Controller if we think we want to have our surrogate - // react to the physics scene by moving it's position. - // Avatar to Avatar collisions - // Prim to avatar collisions + if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f)) + { + // keep track of where we stopped. No more slippin' & slidin' + + // We only want to deactivate the PID Controller if we think we want to have our surrogate + // react to the physics scene by moving it's position. + // Avatar to Avatar collisions + // Prim to avatar collisions - d.BodySetPosition(Body, pos.X, pos.Y, m_targetHoverHeight); - d.BodySetLinearVel(Body, vel.X, vel.Y, 0); - d.BodyAddForce(Body, 0, 0, fz); - return; - } - else - { - _zeroFlag = false; + d.BodySetPosition(Body, pos.X, pos.Y, m_targetHoverHeight); + d.BodySetLinearVel(Body, vel.X, vel.Y, 0); + d.BodyAddForce(Body, 0, 0, fz); + return; + } + else + { + _zeroFlag = false; - // We're flying and colliding with something - fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); - } - } + // We're flying and colliding with something + fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); + } + } - fx *= m_mass; - fy *= m_mass; - //fz *= m_mass; + fx *= m_mass; + fy *= m_mass; + //fz *= m_mass; - fx += m_force.X; - fy += m_force.Y; - fz += m_force.Z; + fx += m_force.X; + fy += m_force.Y; + fz += m_force.Z; - //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString()); - if (fx != 0 || fy != 0 || fz != 0) - { - //m_taintdisable = true; - //base.RaiseOutOfBounds(Position); - //d.BodySetLinearVel(Body, fx, fy, 0f); - if (!d.BodyIsEnabled(Body)) - { - // A physical body at rest on a surface will auto-disable after a while, - // this appears to re-enable it incase the surface it is upon vanishes, - // and the body should fall again. - d.BodySetLinearVel(Body, 0f, 0f, 0f); - d.BodySetForce(Body, 0, 0, 0); - enableBodySoft(); - } + //m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString()); + if (fx != 0 || fy != 0 || fz != 0) + { + //m_taintdisable = true; + //base.RaiseOutOfBounds(Position); + //d.BodySetLinearVel(Body, fx, fy, 0f); + if (!d.BodyIsEnabled(Body)) + { + // A physical body at rest on a surface will auto-disable after a while, + // this appears to re-enable it incase the surface it is upon vanishes, + // and the body should fall again. + d.BodySetLinearVel(Body, 0f, 0f, 0f); + d.BodySetForce(Body, 0, 0, 0); + enableBodySoft(); + } - // 35x10 = 350n times the mass per second applied maximum. - float nmax = 35f * m_mass; - float nmin = -35f * m_mass; + // 35x10 = 350n times the mass per second applied maximum. + float nmax = 35f * m_mass; + float nmin = -35f * m_mass; - if (fx > nmax) - fx = nmax; - if (fx < nmin) - fx = nmin; - if (fy > nmax) - fy = nmax; - if (fy < nmin) - fy = nmin; - d.BodyAddForce(Body, fx, fy, fz); -//Console.WriteLine("AddForce " + fx + "," + fy + "," + fz); - } - } + if (fx > nmax) + fx = nmax; + if (fx < nmin) + fx = nmin; + if (fy > nmax) + fy = nmax; + if (fy < nmin) + fy = nmin; + d.BodyAddForce(Body, fx, fy, fz); +//Console.WriteLine("AddForce " + fx + "," + fy + "," + fz); + } + } } else - { // is not physical, or is not a body or is selected + { // is not physical, or is not a body or is selected // _zeroPosition = d.BodyGetPosition(Body); return; -//Console.WriteLine("Nothing " + m_primName); +//Console.WriteLine("Nothing " + m_primName); } } @@ -1815,18 +1817,18 @@ Console.WriteLine(" JointCreateFixed"); myrot.W = _orientation.W; if (Body != IntPtr.Zero) { - // KF: If this is a root prim do BodySet + // KF: If this is a root prim do BodySet d.BodySetQuaternion(Body, ref myrot); - if (m_isphysical) - { + if (m_isphysical) + { if (!m_angularlock.ApproxEquals(Vector3.One, 0f)) - createAMotor(m_angularlock); - } - } - else - { - // daughter prim, do Geom set - d.GeomSetQuaternion(prim_geom, ref myrot); + createAMotor(m_angularlock); + } + } + else + { + // daughter prim, do Geom set + d.GeomSetQuaternion(prim_geom, ref myrot); } resetCollisionAccounting(); @@ -1890,7 +1892,7 @@ Console.WriteLine(" JointCreateFixed"); m_log.Error("[PHYSICS]: PrimGeom dead"); } } -//Console.WriteLine("changePhysicsStatus for " + m_primName ); +//Console.WriteLine("changePhysicsStatus for " + m_primName); changeadd(2f); } if (childPrim) @@ -1976,7 +1978,7 @@ Console.WriteLine(" JointCreateFixed"); else { _mesh = null; -//Console.WriteLine("changesize 2"); +//Console.WriteLine("changesize 2"); CreateGeom(m_targetSpace, _mesh); } @@ -2083,7 +2085,7 @@ Console.WriteLine(" JointCreateFixed"); else { _mesh = null; -//Console.WriteLine("changeshape"); +//Console.WriteLine("changeshape"); CreateGeom(m_targetSpace, null); } @@ -2454,7 +2456,7 @@ Console.WriteLine(" JointCreateFixed"); if (QuaternionIsFinite(value)) { _orientation = value; - } + } else m_log.Warn("[PHYSICS]: Got NaN quaternion Orientation from Scene in Object"); @@ -2675,8 +2677,8 @@ Console.WriteLine(" JointCreateFixed"); //outofBounds = true; } - //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); -//Console.WriteLine("Adiff " + m_primName + " = " + Adiff); + //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); +//Console.WriteLine("Adiff " + m_primName + " = " + Adiff); if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02) && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02) && (Math.Abs(m_lastposition.Z - l_position.Z) < 0.02) @@ -2684,7 +2686,7 @@ Console.WriteLine(" JointCreateFixed"); && (1.0 - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)) < 0.0001)) // KF 0.01 is far to large { _zeroFlag = true; -//Console.WriteLine("ZFT 2"); +//Console.WriteLine("ZFT 2"); m_throttleUpdates = false; } else diff --git a/OpenSim/Region/Physics/OdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/Physics/OdePlugin/ODERayCastRequestManager.cs index 7314107ad6..ba77daebae 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODERayCastRequestManager.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODERayCastRequestManager.cs @@ -110,7 +110,7 @@ namespace OpenSim.Region.Physics.OdePlugin for (int i = 0; i < reqs.Length; i++) { if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast - RayCast(reqs[i]); // if there isn't anyone to send results + RayCast(reqs[i]); // if there isn't anyone to send results } /* foreach (ODERayCastRequest req in m_PendingRequests) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 0384d6edc1..7984bd9b00 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -2152,7 +2152,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// public void RemovePrimThreadLocked(OdePrim prim) { -//Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName); +//Console.WriteLine("RemovePrimThreadLocked " + prim.m_primName); lock (prim) { remCollisionEventReporting(prim); @@ -2603,12 +2603,12 @@ namespace OpenSim.Region.Physics.OdePlugin lock (_taintedPrimLock) { if (!(_taintedPrimH.Contains(taintedprim))) - { -//Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.m_primName); - _taintedPrimH.Add(taintedprim); // HashSet for searching - _taintedPrimL.Add(taintedprim); // List for ordered readout - } - } + { +//Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.m_primName); + _taintedPrimH.Add(taintedprim); // HashSet for searching + _taintedPrimL.Add(taintedprim); // List for ordered readout + } + } return; } else if (prim is OdeCharacter) @@ -2736,12 +2736,12 @@ namespace OpenSim.Region.Physics.OdePlugin { if (prim.m_taintremove) { - //Console.WriteLine("Simulate calls RemovePrimThreadLocked"); + //Console.WriteLine("Simulate calls RemovePrimThreadLocked"); RemovePrimThreadLocked(prim); } else { - //Console.WriteLine("Simulate calls ProcessTaints"); + //Console.WriteLine("Simulate calls ProcessTaints"); prim.ProcessTaints(timeStep); } processedtaints = true; @@ -2937,7 +2937,7 @@ namespace OpenSim.Region.Physics.OdePlugin } if (processedtaints) -//Console.WriteLine("Simulate calls Clear of _taintedPrim list"); +//Console.WriteLine("Simulate calls Clear of _taintedPrim list"); _taintedPrimH.Clear(); _taintedPrimL.Clear(); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d242506466..30457c34c4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2753,7 +2753,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); m_host.CollisionFilter.Clear(); - if(id != null) + if (id != null) { m_host.CollisionFilter.Add(accept,id); } @@ -4240,7 +4240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPassCollisions(int pass) { m_host.AddScriptLPS(1); - if(pass == 0) + if (pass == 0) { m_host.ParentGroup.PassCollision = false; } @@ -7437,7 +7437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // makes it more difficult to determine a child prim's actual inworld position). if (part.ParentID != 0) v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition(); - res.Add( v ); + res.Add(v); break; case (int)ScriptBaseClass.PRIM_SIZE: diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5abe4b1f81..d8b91598e0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1948,7 +1948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return key.ToString(); } - + /// /// Return information regarding various simulator statistics (sim fps, physics fps, time /// dilation, total number of prims, total number of active scripts, script lps, various @@ -1956,19 +1956,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// client's Statistics Bar (Ctrl-Shift-1) /// /// List of floats - public LSL_List osGetRegionStats() - { + public LSL_List osGetRegionStats() + { CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); m_host.AddScriptLPS(1); LSL_List ret = new LSL_List(); - float[] stats = World.SimulatorStats; - - for (int i = 0; i < 21; i++) - { - ret.Add(new LSL_Float( stats[i] )); - } - return ret; - } + float[] stats = World.SimulatorStats; + + for (int i = 0; i < 21; i++) + { + ret.Add(new LSL_Float(stats[i])); + } + return ret; + } public int osGetSimulatorMemory() { @@ -1984,81 +1984,81 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return (int)pws; } public void osSetSpeed(string UUID, float SpeedModifier) - { - CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); + { + CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); m_host.AddScriptLPS(1); - ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); - avatar.SpeedModifier = SpeedModifier; - } + ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); + avatar.SpeedModifier = SpeedModifier; + } public void osKickAvatar(string FirstName,string SurName,string alert) - { - CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); - if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) + { + CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); + if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) { - foreach (ScenePresence presence in World.GetAvatars()) - { - if ((presence.Firstname == FirstName) && - presence.Lastname == SurName) - { - // kick client... - if (alert != null) - presence.ControllingClient.Kick(alert); + foreach (ScenePresence presence in World.GetAvatars()) + { + if ((presence.Firstname == FirstName) && + presence.Lastname == SurName) + { + // kick client... + if (alert != null) + presence.ControllingClient.Kick(alert); - // ...and close on our side - presence.Scene.IncomingCloseAgent(presence.UUID); - } - } - } - } + // ...and close on our side + presence.Scene.IncomingCloseAgent(presence.UUID); + } + } + } + } public void osCauseDamage(string avatar, double damage) { - CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); - m_host.AddScriptLPS(1); + CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); + m_host.AddScriptLPS(1); - UUID avatarId = new UUID(avatar); - Vector3 pos = m_host.GetWorldPosition(); + UUID avatarId = new UUID(avatar); + Vector3 pos = m_host.GetWorldPosition(); - ScenePresence presence = World.GetScenePresence(avatarId); - if (presence != null) - { - LandData land = World.GetLandData((float)pos.X, (float)pos.Y); - if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage) - { - float health = presence.Health; - health -= (float)damage; - presence.setHealthWithUpdate(health); - if (health <= 0) - { - float healthliveagain = 100; - presence.ControllingClient.SendAgentAlertMessage("You died!", true); - presence.setHealthWithUpdate(healthliveagain); - presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient); - } - } - } + ScenePresence presence = World.GetScenePresence(avatarId); + if (presence != null) + { + LandData land = World.GetLandData((float)pos.X, (float)pos.Y); + if ((land.Flags & (uint)ParcelFlags.AllowDamage) == (uint)ParcelFlags.AllowDamage) + { + float health = presence.Health; + health -= (float)damage; + presence.setHealthWithUpdate(health); + if (health <= 0) + { + float healthliveagain = 100; + presence.ControllingClient.SendAgentAlertMessage("You died!", true); + presence.setHealthWithUpdate(healthliveagain); + presence.Scene.TeleportClientHome(presence.UUID, presence.ControllingClient); + } + } + } } public void osCauseHealing(string avatar, double healing) { - CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); - m_host.AddScriptLPS(1); + CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); + m_host.AddScriptLPS(1); - UUID avatarId = new UUID(avatar); - ScenePresence presence = World.GetScenePresence(avatarId); - Vector3 pos = m_host.GetWorldPosition(); - bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z)); - if (result) - { - if (presence != null) - { - float health = presence.Health; - health += (float)healing; - if (health >= 100) - { - health = 100; - } - presence.setHealthWithUpdate(health); - } - } + UUID avatarId = new UUID(avatar); + ScenePresence presence = World.GetScenePresence(avatarId); + Vector3 pos = m_host.GetWorldPosition(); + bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z)); + if (result) + { + if (presence != null) + { + float health = presence.Health; + health += (float)healing; + if (health >= 100) + { + health = 100; + } + presence.setHealthWithUpdate(health); + } + } } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index ac9405e98d..60b8050cd1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces key osGetMapTexture(); key osGetRegionMapTexture(string regionName); - LSL_List osGetRegionStats(); + LSL_List osGetRegionStats(); int osGetSimulatorMemory(); void osKickAvatar(string FirstName,string SurName,string alert); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index acff8fb545..13b855f3b7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -515,29 +515,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f"; public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"; public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"; - - // Constants for osGetRegionStats - public const int STATS_TIME_DILATION = 0; - public const int STATS_SIM_FPS = 1; - public const int STATS_PHYSICS_FPS = 2; - public const int STATS_AGENT_UPDATES = 3; - public const int STATS_ROOT_AGENTS = 4; - public const int STATS_CHILD_AGENTS = 5; - public const int STATS_TOTAL_PRIMS = 6; - public const int STATS_ACTIVE_PRIMS = 7; - public const int STATS_FRAME_MS = 8; - public const int STATS_NET_MS = 9; - public const int STATS_PHYSICS_MS = 10; - public const int STATS_IMAGE_MS = 11; - public const int STATS_OTHER_MS = 12; - public const int STATS_IN_PACKETS_PER_SECOND = 13; - public const int STATS_OUT_PACKETS_PER_SECOND = 14; - public const int STATS_UNACKED_BYTES = 15; - public const int STATS_AGENT_MS = 16; - public const int STATS_PENDING_DOWNLOADS = 17; - public const int STATS_PENDING_UPLOADS = 18; - public const int STATS_ACTIVE_SCRIPTS = 19; - public const int STATS_SCRIPT_LPS = 20; + + // Constants for osGetRegionStats + public const int STATS_TIME_DILATION = 0; + public const int STATS_SIM_FPS = 1; + public const int STATS_PHYSICS_FPS = 2; + public const int STATS_AGENT_UPDATES = 3; + public const int STATS_ROOT_AGENTS = 4; + public const int STATS_CHILD_AGENTS = 5; + public const int STATS_TOTAL_PRIMS = 6; + public const int STATS_ACTIVE_PRIMS = 7; + public const int STATS_FRAME_MS = 8; + public const int STATS_NET_MS = 9; + public const int STATS_PHYSICS_MS = 10; + public const int STATS_IMAGE_MS = 11; + public const int STATS_OTHER_MS = 12; + public const int STATS_IN_PACKETS_PER_SECOND = 13; + public const int STATS_OUT_PACKETS_PER_SECOND = 14; + public const int STATS_UNACKED_BYTES = 15; + public const int STATS_AGENT_MS = 16; + public const int STATS_PENDING_DOWNLOADS = 17; + public const int STATS_PENDING_UPLOADS = 18; + public const int STATS_ACTIVE_SCRIPTS = 19; + public const int STATS_SCRIPT_LPS = 20; } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 2ec62269d2..3870af3213 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -632,11 +632,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_OSSL_Functions.osGetRegionMapTexture(regionName); } - - public LSL_List osGetRegionStats() - { - return m_OSSL_Functions.osGetRegionStats(); - } + + public LSL_List osGetRegionStats() + { + return m_OSSL_Functions.osGetRegionStats(); + } /// /// Returns the amount of memory in use by the Simulator Daemon. @@ -649,7 +649,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } public void osKickAvatar(string FirstName,string SurName,string alert) { - m_OSSL_Functions.osKickAvatar( FirstName, SurName, alert); + m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); } public void osSetSpeed(string UUID, float SpeedModifier) { diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 95f78521e1..6dd94bb042 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -591,7 +591,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine Dictionary, KeyValuePair> linemap; - lock(m_ScriptErrors) + lock (m_ScriptErrors) { try { diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 8da9209b89..1a22bdc9e7 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -289,24 +289,24 @@ namespace OpenSim.Tests.Common.Mock public event PlacesQuery OnPlacesQuery; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 From e69ec1108ff6d7f043d11196e2e0d8f4bad54695 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 3 Jan 2010 21:42:22 +0000 Subject: [PATCH 10/11] Cause llSetText to send prim updates. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 30457c34c4..39b597e05d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3818,6 +3818,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Util.Clip((float)color.z, 0.0f, 1.0f)); m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); m_host.ParentGroup.HasGroupChanged = true; + m_host.ParentGroup.ScheduleGroupForFullUpdate(); } public LSL_Float llWater(LSL_Vector offset) From 1121919b57e1495d0357d59e010a865b91757bfb Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 3 Jan 2010 22:02:36 +0000 Subject: [PATCH 11/11] Solve conflict --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index eda3d60f96..a14e3adbbc 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2910,13 +2910,6 @@ namespace OpenSim.Region.Framework.Scenes SetText(text); } - public void StopLookAt() - { - m_parentGroup.stopLookAt(); - - m_parentGroup.ScheduleGroupForTerseUpdate(); - } - public void StopMoveToTarget() { m_parentGroup.stopMoveToTarget();