aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llinventory/llnotecard.cpp6
-rw-r--r--linden/indra/llinventory/llparcel.cpp17
-rw-r--r--linden/indra/llinventory/llparcel.h44
-rw-r--r--linden/indra/llinventory/llparcelflags.h7
-rw-r--r--linden/indra/llinventory/llsaleinfo.cpp4
-rw-r--r--linden/indra/llinventory/lluserrelations.h2
6 files changed, 58 insertions, 22 deletions
diff --git a/linden/indra/llinventory/llnotecard.cpp b/linden/indra/llinventory/llnotecard.cpp
index 47dd690..86eb5b2 100644
--- a/linden/indra/llinventory/llnotecard.cpp
+++ b/linden/indra/llinventory/llnotecard.cpp
@@ -104,12 +104,6 @@ bool LLNotecard::importEmbeddedItemsStream(std::istream& str)
104 goto import_file_failed; 104 goto import_file_failed;
105 } 105 }
106 106
107 if( (index < 0) )
108 {
109 llwarns << "Invalid LLEmbeddedItems file format: invalid ext char index: " << index << llendl;
110 goto import_file_failed;
111 }
112
113 str >> std::ws >> "inv_item\t0\n"; 107 str >> std::ws >> "inv_item\t0\n";
114 if(str.fail()) 108 if(str.fail())
115 { 109 {
diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp
index 5b2052f..990e77d 100644
--- a/linden/indra/llinventory/llparcel.cpp
+++ b/linden/indra/llinventory/llparcel.cpp
@@ -316,6 +316,11 @@ void LLParcel::setLocalID(S32 local_id)
316 mLocalID = local_id; 316 mLocalID = local_id;
317} 317}
318 318
319void LLParcel::setAllParcelFlags(U32 flags)
320{
321 mParcelFlags = flags;
322}
323
319void LLParcel::setParcelFlag(U32 flag, BOOL b) 324void LLParcel::setParcelFlag(U32 flag, BOOL b)
320{ 325{
321 if (b) 326 if (b)
@@ -712,6 +717,16 @@ BOOL LLParcel::importStream(std::istream& input_stream)
712 LLString::convertToU32(value, setting); 717 LLString::convertToU32(value, setting);
713 setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, setting); 718 setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, setting);
714 } 719 }
720 else if ("allow_voice_chat" == keyword)
721 {
722 LLString::convertToU32(value, setting);
723 setParcelFlag(PF_ALLOW_VOICE_CHAT, setting);
724 }
725 else if ("use_estate_voice_chan" == keyword)
726 {
727 LLString::convertToU32(value, setting);
728 setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, setting);
729 }
715 else if ("allow_scripts" == keyword) 730 else if ("allow_scripts" == keyword)
716 { 731 {
717 LLString::convertToU32(value, setting); 732 LLString::convertToU32(value, setting);
@@ -1104,6 +1119,8 @@ BOOL LLParcel::exportStream(std::ostream& output_stream)
1104 output_stream << "\t\t sound_local " << (getSoundLocal() ? 1 : 0) << "\n"; 1119 output_stream << "\t\t sound_local " << (getSoundLocal() ? 1 : 0) << "\n";
1105 output_stream << "\t\t allow_scripts " << (getAllowOtherScripts() ? 1 : 0) << "\n"; 1120 output_stream << "\t\t allow_scripts " << (getAllowOtherScripts() ? 1 : 0) << "\n";
1106 output_stream << "\t\t allow_group_scripts " << (getAllowGroupScripts() ? 1 : 0) << "\n"; 1121 output_stream << "\t\t allow_group_scripts " << (getAllowGroupScripts() ? 1 : 0) << "\n";
1122 output_stream << "\t\t allow_voice_chat " << (getVoiceEnabled() ? 1 : 0) << "\n";
1123 output_stream << "\t\t use_estate_voice_chan " << (getVoiceUseEstateChannel() ? 1 : 0) << "\n";
1107 output_stream << "\t\t for_sale " << (getForSale() ? 1 : 0) << "\n"; 1124 output_stream << "\t\t for_sale " << (getForSale() ? 1 : 0) << "\n";
1108 output_stream << "\t\t sell_w_objects " << (getSellWithObjects() ? 1 : 0) << "\n"; 1125 output_stream << "\t\t sell_w_objects " << (getSellWithObjects() ? 1 : 0) << "\n";
1109 output_stream << "\t\t draw_distance " << mDrawDistance << "\n"; 1126 output_stream << "\t\t draw_distance " << mDrawDistance << "\n";
diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h
index 3144eb9..371b802 100644
--- a/linden/indra/llinventory/llparcel.h
+++ b/linden/indra/llinventory/llparcel.h
@@ -167,21 +167,39 @@ public:
167 167
168 // CREATORS 168 // CREATORS
169 LLParcel(); 169 LLParcel();
170 LLParcel( const LLUUID &owner_id, 170 LLParcel(
171 BOOL modify, BOOL terraform, BOOL damage, 171 const LLUUID &owner_id,
172 time_t claim_date, S32 claim_price, S32 rent_price, S32 area, S32 sim_object_limit, F32 parcel_object_bonus, 172 BOOL modify,
173 BOOL is_group_owned = FALSE); 173 BOOL terraform,
174 BOOL damage,
175 time_t claim_date,
176 S32 claim_price,
177 S32 rent_price,
178 S32 area,
179 S32 sim_object_limit,
180 F32 parcel_object_bonus,
181 BOOL is_group_owned = FALSE);
174 virtual ~LLParcel(); 182 virtual ~LLParcel();
175 183
176 void init( const LLUUID &owner_id, 184 void init(
177 BOOL modify, BOOL terraform, BOOL damage, 185 const LLUUID &owner_id,
178 time_t claim_date, S32 claim_price, S32 rent_price, 186 BOOL modify,
179 S32 area, S32 sim_object_limit, F32 parcel_object_bonus, BOOL is_group_owned = FALSE); 187 BOOL terraform,
188 BOOL damage,
189 time_t claim_date,
190 S32 claim_price,
191 S32 rent_price,
192 S32 area,
193 S32 sim_object_limit,
194 F32 parcel_object_bonus,
195 BOOL is_group_owned = FALSE);
180 196
181 // TODO: make an actual copy constructor for this 197 // TODO: make an actual copy constructor for this
182 void overrideParcelFlags(U32 flags); 198 void overrideParcelFlags(U32 flags);
183 // if you specify an agent id here, the group id will be zeroed 199 // if you specify an agent id here, the group id will be zeroed
184 void overrideOwner(const LLUUID& owner_id, BOOL is_group_owned = FALSE); 200 void overrideOwner(
201 const LLUUID& owner_id,
202 BOOL is_group_owned = FALSE);
185 void overrideSaleTimerExpires(F32 secs_left) { mSaleTimerExpires.setTimerExpirySec(secs_left); } 203 void overrideSaleTimerExpires(F32 secs_left) { mSaleTimerExpires.setTimerExpirySec(secs_left); }
186 204
187 // MANIPULATORS 205 // MANIPULATORS
@@ -211,7 +229,7 @@ public:
211 229
212 void setAuctionID(U32 auction_id) { mAuctionID = auction_id;} 230 void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
213 231
214 void setAllParcelFlags(U32 flags) { mParcelFlags = flags; } 232 void setAllParcelFlags(U32 flags);
215 void setParcelFlag(U32 flag, BOOL b); 233 void setParcelFlag(U32 flag, BOOL b);
216 234
217 void setArea(S32 area, S32 sim_object_limit); 235 void setArea(S32 area, S32 sim_object_limit);
@@ -410,6 +428,10 @@ public:
410 { return (mParcelFlags & PF_FOR_SALE) ? TRUE : FALSE; } 428 { return (mParcelFlags & PF_FOR_SALE) ? TRUE : FALSE; }
411 BOOL getSoundLocal() const 429 BOOL getSoundLocal() const
412 { return (mParcelFlags & PF_SOUND_LOCAL) ? TRUE : FALSE; } 430 { return (mParcelFlags & PF_SOUND_LOCAL) ? TRUE : FALSE; }
431 BOOL getVoiceEnabled() const
432 { return (mParcelFlags & PF_ALLOW_VOICE_CHAT) ? TRUE : FALSE; }
433 BOOL getVoiceUseEstateChannel() const
434 { return (mParcelFlags & PF_USE_ESTATE_VOICE_CHAN) ? TRUE : FALSE; }
413 BOOL getAllowPublish() const 435 BOOL getAllowPublish() const
414 { return (mParcelFlags & PF_ALLOW_PUBLISH) ? TRUE : FALSE; } 436 { return (mParcelFlags & PF_ALLOW_PUBLISH) ? TRUE : FALSE; }
415 BOOL getMaturePublish() const 437 BOOL getMaturePublish() const
diff --git a/linden/indra/llinventory/llparcelflags.h b/linden/indra/llinventory/llparcelflags.h
index 17d9151..38d49fe 100644
--- a/linden/indra/llinventory/llparcelflags.h
+++ b/linden/indra/llinventory/llparcelflags.h
@@ -61,7 +61,8 @@ const U32 PF_ALLOW_GROUP_SCRIPTS = 1 << 25; // Allow scripts owned by group
61const U32 PF_CREATE_GROUP_OBJECTS = 1 << 26; // Allow object creation by group members or objects 61const U32 PF_CREATE_GROUP_OBJECTS = 1 << 26; // Allow object creation by group members or objects
62const U32 PF_ALLOW_ALL_OBJECT_ENTRY = 1 << 27; // Allow all objects to enter a parcel 62const U32 PF_ALLOW_ALL_OBJECT_ENTRY = 1 << 27; // Allow all objects to enter a parcel
63const U32 PF_ALLOW_GROUP_OBJECT_ENTRY = 1 << 28; // Only allow group (and owner) objects to enter the parcel 63const U32 PF_ALLOW_GROUP_OBJECT_ENTRY = 1 << 28; // Only allow group (and owner) objects to enter the parcel
64 64const U32 PF_ALLOW_VOICE_CHAT = 1 << 29; // Allow residents to use voice chat on this parcel
65const U32 PF_USE_ESTATE_VOICE_CHAN = 1 << 30;
65 66
66const U32 PF_RESERVED = 1 << 31; 67const U32 PF_RESERVED = 1 << 31;
67 68
@@ -83,7 +84,9 @@ const U32 PF_DEFAULT = PF_ALLOW_FLY
83 | PF_CREATE_GROUP_OBJECTS 84 | PF_CREATE_GROUP_OBJECTS
84 | PF_USE_BAN_LIST 85 | PF_USE_BAN_LIST
85 | PF_ALLOW_ALL_OBJECT_ENTRY 86 | PF_ALLOW_ALL_OBJECT_ENTRY
86 | PF_ALLOW_GROUP_OBJECT_ENTRY; 87 | PF_ALLOW_GROUP_OBJECT_ENTRY
88 | PF_ALLOW_VOICE_CHAT
89 | PF_USE_ESTATE_VOICE_CHAN;
87 90
88// Access list flags 91// Access list flags
89const U32 AL_ACCESS = (1 << 0); 92const U32 AL_ACCESS = (1 << 0);
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp
index 9364529..debb092 100644
--- a/linden/indra/llinventory/llsaleinfo.cpp
+++ b/linden/indra/llinventory/llsaleinfo.cpp
@@ -175,7 +175,7 @@ BOOL LLSaleInfo::importFile(FILE* fp, BOOL& has_perm_mask, U32& perm_mask)
175 buffer, 175 buffer,
176 " %254s %254s", 176 " %254s %254s",
177 keyword, valuestr); 177 keyword, valuestr);
178 if(!keyword) 178 if(!keyword[0])
179 { 179 {
180 continue; 180 continue;
181 } 181 }
@@ -231,7 +231,7 @@ BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_m
231 buffer, 231 buffer,
232 " %254s %254s", 232 " %254s %254s",
233 keyword, valuestr); 233 keyword, valuestr);
234 if(!keyword) 234 if(!keyword[0])
235 { 235 {
236 continue; 236 continue;
237 } 237 }
diff --git a/linden/indra/llinventory/lluserrelations.h b/linden/indra/llinventory/lluserrelations.h
index 430dc43..3895533 100644
--- a/linden/indra/llinventory/lluserrelations.h
+++ b/linden/indra/llinventory/lluserrelations.h
@@ -38,7 +38,7 @@
38 * @class LLRelationship 38 * @class LLRelationship
39 * 39 *
40 * This class represents a relationship between two agents, where the 40 * This class represents a relationship between two agents, where the
41 * related agent is stored and the other agent is the relationship is 41 * related agent is stored and the other agent in the relationship is
42 * implicit by container ownership. 42 * implicit by container ownership.
43 * This is merely a cache of this information used by the sim 43 * This is merely a cache of this information used by the sim
44 * and viewer. 44 * and viewer.