diff options
author | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
commit | b2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch) | |
tree | 3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/newview/llfloaterregioninfo.cpp | |
parent | Second Life viewer sources 1.14.0.1 (diff) | |
download | meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2 meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz |
Second Life viewer sources 1.15.0.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterregioninfo.cpp | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index b758777..7fa5f6a 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp | |||
@@ -5,6 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (c) 2004-2007, Linden Research, Inc. | 6 | * Copyright (c) 2004-2007, Linden Research, Inc. |
7 | * | 7 | * |
8 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | 9 | * The source code in this file ("Source Code") is provided by Linden Lab |
9 | * to you under the terms of the GNU General Public License, version 2.0 | 10 | * to you under the terms of the GNU General Public License, version 2.0 |
10 | * ("GPL"), unless you have obtained a separate licensing agreement | 11 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -697,34 +698,34 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() | |||
697 | strings_t strings; | 698 | strings_t strings; |
698 | //integers_t integers; | 699 | //integers_t integers; |
699 | char buffer[MAX_STRING]; /* Flawfinder: ignore*/ | 700 | char buffer[MAX_STRING]; /* Flawfinder: ignore*/ |
700 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 701 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
701 | strings.push_back(strings_t::value_type(buffer)); | 702 | strings.push_back(strings_t::value_type(buffer)); |
702 | 703 | ||
703 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 704 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
704 | strings.push_back(strings_t::value_type(buffer)); | 705 | strings.push_back(strings_t::value_type(buffer)); |
705 | 706 | ||
706 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 707 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
707 | strings.push_back(strings_t::value_type(buffer)); | 708 | strings.push_back(strings_t::value_type(buffer)); |
708 | 709 | ||
709 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 710 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
710 | strings.push_back(strings_t::value_type(buffer)); | 711 | strings.push_back(strings_t::value_type(buffer)); |
711 | 712 | ||
712 | F32 value = (F32)childGetValue("agent_limit_spin").asReal(); | 713 | F32 value = (F32)childGetValue("agent_limit_spin").asReal(); |
713 | snprintf(buffer, MAX_STRING, "%f", value); /* Flawfinder: ignore*/ | 714 | snprintf(buffer, MAX_STRING, "%f", value); /* Flawfinder: ignore */ |
714 | strings.push_back(strings_t::value_type(buffer)); | 715 | strings.push_back(strings_t::value_type(buffer)); |
715 | 716 | ||
716 | value = (F32)childGetValue("object_bonus_spin").asReal(); | 717 | value = (F32)childGetValue("object_bonus_spin").asReal(); |
717 | snprintf(buffer, MAX_STRING, "%f", value); /* Flawfinder: ignore*/ | 718 | snprintf(buffer, MAX_STRING, "%f", value); /* Flawfinder: ignore */ |
718 | strings.push_back(strings_t::value_type(buffer)); | 719 | strings.push_back(strings_t::value_type(buffer)); |
719 | 720 | ||
720 | U8 access = LLViewerRegion::stringToAccess(childGetValue("access_combo").asString().c_str()); | 721 | U8 access = LLViewerRegion::stringToAccess(childGetValue("access_combo").asString().c_str()); |
721 | snprintf(buffer, MAX_STRING, "%d", (S32)access); /* Flawfinder: ignore */ | 722 | snprintf(buffer, MAX_STRING, "%d", (S32)access); /* Flawfinder: ignore */ |
722 | strings.push_back(strings_t::value_type(buffer)); | 723 | strings.push_back(strings_t::value_type(buffer)); |
723 | 724 | ||
724 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 725 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
725 | strings.push_back(strings_t::value_type(buffer)); | 726 | strings.push_back(strings_t::value_type(buffer)); |
726 | 727 | ||
727 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 728 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
728 | strings.push_back(strings_t::value_type(buffer)); | 729 | strings.push_back(strings_t::value_type(buffer)); |
729 | 730 | ||
730 | LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); | 731 | LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); |
@@ -793,13 +794,13 @@ BOOL LLPanelRegionDebugInfo::sendUpdate() | |||
793 | strings_t strings; | 794 | strings_t strings; |
794 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ | 795 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ |
795 | 796 | ||
796 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 797 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
797 | strings.push_back(buffer); | 798 | strings.push_back(buffer); |
798 | 799 | ||
799 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 800 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
800 | strings.push_back(buffer); | 801 | strings.push_back(buffer); |
801 | 802 | ||
802 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ | 803 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
803 | strings.push_back(buffer); | 804 | strings.push_back(buffer); |
804 | 805 | ||
805 | LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); | 806 | LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); |
@@ -957,7 +958,7 @@ bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region) | |||
957 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ | 958 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ |
958 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) | 959 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) |
959 | { | 960 | { |
960 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ | 961 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ |
961 | texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this, buffer); | 962 | texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this, buffer); |
962 | if(texture_ctrl) | 963 | if(texture_ctrl) |
963 | { | 964 | { |
@@ -970,9 +971,9 @@ bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region) | |||
970 | 971 | ||
971 | for(S32 i = 0; i < CORNER_COUNT; ++i) | 972 | for(S32 i = 0; i < CORNER_COUNT; ++i) |
972 | { | 973 | { |
973 | snprintf(buffer, MAX_STRING, "height_start_spin_%d", i); /* Flawfinder: ignore */ | 974 | snprintf(buffer, MAX_STRING, "height_start_spin_%d", i); /* Flawfinder: ignore */ |
974 | childSetValue(buffer, LLSD(compp->getStartHeight(i))); | 975 | childSetValue(buffer, LLSD(compp->getStartHeight(i))); |
975 | snprintf(buffer, MAX_STRING, "height_range_spin_%d", i); /* Flawfinder: ignore */ | 976 | snprintf(buffer, MAX_STRING, "height_range_spin_%d", i); /* Flawfinder: ignore */ |
976 | childSetValue(buffer, LLSD(compp->getHeightRange(i))); | 977 | childSetValue(buffer, LLSD(compp->getHeightRange(i))); |
977 | } | 978 | } |
978 | 979 | ||
@@ -987,15 +988,15 @@ BOOL LLPanelRegionTextureInfo::postBuild() | |||
987 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ | 988 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ |
988 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) | 989 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) |
989 | { | 990 | { |
990 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ | 991 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ |
991 | initCtrl(buffer); | 992 | initCtrl(buffer); |
992 | } | 993 | } |
993 | 994 | ||
994 | for(S32 i = 0; i < CORNER_COUNT; ++i) | 995 | for(S32 i = 0; i < CORNER_COUNT; ++i) |
995 | { | 996 | { |
996 | snprintf(buffer, MAX_STRING, "height_start_spin_%d", i); /* Flawfinder: ignore */ | 997 | snprintf(buffer, MAX_STRING, "height_start_spin_%d", i); /* Flawfinder: ignore */ |
997 | initCtrl(buffer); | 998 | initCtrl(buffer); |
998 | snprintf(buffer, MAX_STRING, "height_range_spin_%d", i); /* Flawfinder: ignore */ | 999 | snprintf(buffer, MAX_STRING, "height_range_spin_%d", i); /* Flawfinder: ignore */ |
999 | initCtrl(buffer); | 1000 | initCtrl(buffer); |
1000 | } | 1001 | } |
1001 | 1002 | ||
@@ -1035,13 +1036,13 @@ BOOL LLPanelRegionTextureInfo::sendUpdate() | |||
1035 | 1036 | ||
1036 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) | 1037 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) |
1037 | { | 1038 | { |
1038 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ | 1039 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ |
1039 | texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this, buffer); | 1040 | texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this, buffer); |
1040 | if(texture_ctrl) | 1041 | if(texture_ctrl) |
1041 | { | 1042 | { |
1042 | LLUUID tmp_id(texture_ctrl->getImageAssetID()); | 1043 | LLUUID tmp_id(texture_ctrl->getImageAssetID()); |
1043 | tmp_id.toString(id_str); | 1044 | tmp_id.toString(id_str); |
1044 | snprintf(buffer, MAX_STRING, "%d %s", i, id_str); /* Flawfinder: ignore */ | 1045 | snprintf(buffer, MAX_STRING, "%d %s", i, id_str); /* Flawfinder: ignore */ |
1045 | strings.push_back(strings_t::value_type(buffer)); | 1046 | strings.push_back(strings_t::value_type(buffer)); |
1046 | } | 1047 | } |
1047 | } | 1048 | } |
@@ -1049,9 +1050,9 @@ BOOL LLPanelRegionTextureInfo::sendUpdate() | |||
1049 | strings.clear(); | 1050 | strings.clear(); |
1050 | for(S32 i = 0; i < CORNER_COUNT; ++i) | 1051 | for(S32 i = 0; i < CORNER_COUNT; ++i) |
1051 | { | 1052 | { |
1052 | snprintf(buffer, MAX_STRING, "height_start_spin_%d", i); /* Flawfinder: ignore */ | 1053 | snprintf(buffer, MAX_STRING, "height_start_spin_%d", i); /* Flawfinder: ignore */ |
1053 | snprintf(buffer2, MAX_STRING, "height_range_spin_%d", i); /* Flawfinder: ignore */ | 1054 | snprintf(buffer2, MAX_STRING, "height_range_spin_%d", i); /* Flawfinder: ignore */ |
1054 | snprintf(buffer, MAX_STRING, "%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal()); /* Flawfinder: ignore */ | 1055 | snprintf(buffer, MAX_STRING, "%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal()); /* Flawfinder: ignore */ |
1055 | strings.push_back(strings_t::value_type(buffer)); | 1056 | strings.push_back(strings_t::value_type(buffer)); |
1056 | } | 1057 | } |
1057 | sendEstateOwnerMessage(msg, "textureheights", invoice, strings); | 1058 | sendEstateOwnerMessage(msg, "textureheights", invoice, strings); |
@@ -1065,7 +1066,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes() | |||
1065 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) | 1066 | for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) |
1066 | { | 1067 | { |
1067 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ | 1068 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ |
1068 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ | 1069 | snprintf(buffer, MAX_STRING, "texture_detail_%d", i); /* Flawfinder: ignore */ |
1069 | LLTextureCtrl* texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this, buffer); | 1070 | LLTextureCtrl* texture_ctrl = LLViewerUICtrlFactory::getTexturePickerByName(this, buffer); |
1070 | if (!texture_ctrl) continue; | 1071 | if (!texture_ctrl) continue; |
1071 | 1072 | ||
@@ -1170,17 +1171,17 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() | |||
1170 | strings_t strings; | 1171 | strings_t strings; |
1171 | LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); | 1172 | LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); |
1172 | 1173 | ||
1173 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("water_height_spin").asReal()); /* Flawfinder: ignore */ | 1174 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("water_height_spin").asReal()); /* Flawfinder: ignore */ |
1174 | strings.push_back(buffer); | 1175 | strings.push_back(buffer); |
1175 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("terrain_raise_spin").asReal()); /* Flawfinder: ignore */ | 1176 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("terrain_raise_spin").asReal()); /* Flawfinder: ignore */ |
1176 | strings.push_back(buffer); | 1177 | strings.push_back(buffer); |
1177 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("terrain_lower_spin").asReal()); /* Flawfinder: ignore */ | 1178 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("terrain_lower_spin").asReal()); /* Flawfinder: ignore */ |
1178 | strings.push_back(buffer); | 1179 | strings.push_back(buffer); |
1179 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore*/ | 1180 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
1180 | strings.push_back(buffer); | 1181 | strings.push_back(buffer); |
1181 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore*/ | 1182 | snprintf(buffer, MAX_STRING, "%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N")); /* Flawfinder: ignore */ |
1182 | strings.push_back(buffer); | 1183 | strings.push_back(buffer); |
1183 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("sun_hour_slider").asReal() ); /* Flawfinder: ignore*/ | 1184 | snprintf(buffer, MAX_STRING, "%f", (F32)childGetValue("sun_hour_slider").asReal() ); /* Flawfinder: ignore */ |
1184 | strings.push_back(buffer); | 1185 | strings.push_back(buffer); |
1185 | 1186 | ||
1186 | // Grab estate information in case the user decided to set the | 1187 | // Grab estate information in case the user decided to set the |
@@ -1206,11 +1207,11 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() | |||
1206 | estate_sun_hour = panel->getSunHour(); | 1207 | estate_sun_hour = panel->getSunHour(); |
1207 | } | 1208 | } |
1208 | 1209 | ||
1209 | snprintf(buffer, MAX_STRING, "%s", (estate_global_time ? "Y" : "N") ); /* Flawfinder: ignore*/ | 1210 | snprintf(buffer, MAX_STRING, "%s", (estate_global_time ? "Y" : "N") ); /* Flawfinder: ignore */ |
1210 | strings.push_back(buffer); | 1211 | strings.push_back(buffer); |
1211 | snprintf(buffer, MAX_STRING, "%s", (estate_fixed_sun ? "Y" : "N") ); /* Flawfinder: ignore*/ | 1212 | snprintf(buffer, MAX_STRING, "%s", (estate_fixed_sun ? "Y" : "N") ); /* Flawfinder: ignore */ |
1212 | strings.push_back(buffer); | 1213 | strings.push_back(buffer); |
1213 | snprintf(buffer, MAX_STRING, "%f", estate_sun_hour); /* Flawfinder: ignore*/ | 1214 | snprintf(buffer, MAX_STRING, "%f", estate_sun_hour); /* Flawfinder: ignore */ |
1214 | strings.push_back(buffer); | 1215 | strings.push_back(buffer); |
1215 | 1216 | ||
1216 | sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings); | 1217 | sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings); |
@@ -1827,7 +1828,7 @@ void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_ | |||
1827 | msg->nextBlock("ParamList"); | 1828 | msg->nextBlock("ParamList"); |
1828 | msg->addString("Parameter", buf); | 1829 | msg->addString("Parameter", buf); |
1829 | 1830 | ||
1830 | snprintf(buf, MAX_STRING, "%u", flags); /* Flawfinder: ignore*/ | 1831 | snprintf(buf, MAX_STRING, "%u", flags); /* Flawfinder: ignore */ |
1831 | msg->nextBlock("ParamList"); | 1832 | msg->nextBlock("ParamList"); |
1832 | msg->addString("Parameter", buf); | 1833 | msg->addString("Parameter", buf); |
1833 | 1834 | ||
@@ -2084,7 +2085,7 @@ void LLPanelEstateInfo::commitEstateInfo() | |||
2084 | msg->addString("Parameter", getEstateName()); | 2085 | msg->addString("Parameter", getEstateName()); |
2085 | 2086 | ||
2086 | char buf[MAX_STRING]; /* Flawfinder: ignore*/ | 2087 | char buf[MAX_STRING]; /* Flawfinder: ignore*/ |
2087 | snprintf(buf, MAX_STRING, "%u", computeEstateFlags()); /* Flawfinder: ignore*/ | 2088 | snprintf(buf, MAX_STRING, "%u", computeEstateFlags()); /* Flawfinder: ignore */ |
2088 | msg->nextBlock("ParamList"); | 2089 | msg->nextBlock("ParamList"); |
2089 | msg->addString("Parameter", buf); | 2090 | msg->addString("Parameter", buf); |
2090 | 2091 | ||
@@ -2094,7 +2095,7 @@ void LLPanelEstateInfo::commitEstateInfo() | |||
2094 | sun_hour = 0.f; // 0 = global time | 2095 | sun_hour = 0.f; // 0 = global time |
2095 | } | 2096 | } |
2096 | 2097 | ||
2097 | snprintf(buf, MAX_STRING, "%d", (S32)(sun_hour*1024.0f)); /* Flawfinder: ignore*/ | 2098 | snprintf(buf, MAX_STRING, "%d", (S32)(sun_hour*1024.0f)); /* Flawfinder: ignore */ |
2098 | msg->nextBlock("ParamList"); | 2099 | msg->nextBlock("ParamList"); |
2099 | msg->addString("Parameter", buf); | 2100 | msg->addString("Parameter", buf); |
2100 | 2101 | ||