diff options
author | Armin Weatherwax | 2010-06-10 17:47:36 +0200 |
---|---|---|
committer | Jacek Antonelli | 2010-06-19 02:43:36 -0500 |
commit | 55121d55012de5303a209402df4b26a81afe6387 (patch) | |
tree | 685ab294f57c1bced2fe29473034fd3958003f3e /linden | |
parent | fix another issue with alpha (diff) | |
download | meta-impy-55121d55012de5303a209402df4b26a81afe6387.zip meta-impy-55121d55012de5303a209402df4b26a81afe6387.tar.gz meta-impy-55121d55012de5303a209402df4b26a81afe6387.tar.bz2 meta-impy-55121d55012de5303a209402df4b26a81afe6387.tar.xz |
feature: have clothing layer protection on and don't broadcast client name
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/llprimitive/llprimitive.cpp | 9 | ||||
-rw-r--r-- | linden/indra/llprimitive/llprimitive.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 16 | ||||
-rw-r--r-- | linden/indra/newview/llagent.cpp | 12 | ||||
-rw-r--r-- | linden/indra/newview/llprefsadvanced.cpp | 14 |
5 files changed, 40 insertions, 13 deletions
diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp index c67c7d9..f1b7522 100644 --- a/linden/indra/llprimitive/llprimitive.cpp +++ b/linden/indra/llprimitive/llprimitive.cpp | |||
@@ -1134,7 +1134,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat | |||
1134 | // Pack information about all texture entries into container: | 1134 | // Pack information about all texture entries into container: |
1135 | // { TextureEntry Variable 2 } | 1135 | // { TextureEntry Variable 2 } |
1136 | // Includes information about image ID, color, scale S,T, offset S,T and rotation | 1136 | // Includes information about image ID, color, scale S,T, offset S,T and rotation |
1137 | BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, bool shield) const | 1137 | BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield) const |
1138 | { | 1138 | { |
1139 | const U32 MAX_TES = 32; | 1139 | const U32 MAX_TES = 32; |
1140 | 1140 | ||
@@ -1154,7 +1154,10 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, bool shield) const | |||
1154 | U8 *cur_ptr = packed_buffer; | 1154 | U8 *cur_ptr = packed_buffer; |
1155 | 1155 | ||
1156 | S32 last_face_index = getNumTEs() - 1; | 1156 | S32 last_face_index = getNumTEs() - 1; |
1157 | 1157 | ||
1158 | LLUUID client_tag = LLUUID("cc7a030f-282f-c165-44d2-b5ee572e72bf");//Imprudence | ||
1159 | if (shield == 2)client_tag = LLUUID("c228d1cf-4b5d-4ba8-84f4-899a0796aa97");//IMG_DEFAULT_AVATAR | ||
1160 | |||
1158 | if (last_face_index > -1) | 1161 | if (last_face_index > -1) |
1159 | { | 1162 | { |
1160 | // ...if we hit the front, send one image id | 1163 | // ...if we hit the front, send one image id |
@@ -1171,7 +1174,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, bool shield) const | |||
1171 | if(face_index == 6)f_f_i = 10; | 1174 | if(face_index == 6)f_f_i = 10; |
1172 | if(face_index == 3)f_f_i = 11; | 1175 | if(face_index == 3)f_f_i = 11; |
1173 | if(f_f_i == face_index)memcpy(&image_ids[face_index*16],LLUUID("c228d1cf-4b5d-4ba8-84f4-899a0796aa97").mData,16); | 1176 | if(f_f_i == face_index)memcpy(&image_ids[face_index*16],LLUUID("c228d1cf-4b5d-4ba8-84f4-899a0796aa97").mData,16); |
1174 | else if(f_f_i == 64)memcpy(&image_ids[face_index*16],LLUUID("cc7a030f-282f-c165-44d2-b5ee572e72bf").mData,16); | 1177 | else if(f_f_i == 64)memcpy(&image_ids[face_index*16],client_tag.mData,16); |
1175 | else memcpy(&image_ids[face_index*16],LLUUID("4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6").mData,16);//grey block | 1178 | else memcpy(&image_ids[face_index*16],LLUUID("4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6").mData,16);//grey block |
1176 | }else memcpy(&image_ids[face_index*16],getTE(face_index)->getID().mData,16); /* Flawfinder: ignore */ | 1179 | }else memcpy(&image_ids[face_index*16],getTE(face_index)->getID().mData,16); /* Flawfinder: ignore */ |
1177 | 1180 | ||
diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h index 27484e5..efabb82 100644 --- a/linden/indra/llprimitive/llprimitive.h +++ b/linden/indra/llprimitive/llprimitive.h | |||
@@ -338,7 +338,7 @@ public: | |||
338 | void copyTEs(const LLPrimitive *primitive); | 338 | void copyTEs(const LLPrimitive *primitive); |
339 | S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const; | 339 | S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const; |
340 | S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type); | 340 | S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type); |
341 | BOOL packTEMessage(LLMessageSystem *mesgsys, bool shield = false) const; | 341 | BOOL packTEMessage(LLMessageSystem *mesgsys, int shield = 0) const; |
342 | BOOL packTEMessage(LLDataPacker &dp) const; | 342 | BOOL packTEMessage(LLDataPacker &dp) const; |
343 | S32 unpackTEMessage(LLMessageSystem *mesgsys, char *block_name); | 343 | S32 unpackTEMessage(LLMessageSystem *mesgsys, char *block_name); |
344 | S32 unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, const S32 block_num); // Variable num of blocks | 344 | S32 unpackTEMessage(LLMessageSystem *mesgsys, char *block_name, const S32 block_num); // Variable num of blocks |
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 8a48016..c1ed2b4 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -922,7 +922,7 @@ | |||
922 | <key>ShowClientNameTag</key> | 922 | <key>ShowClientNameTag</key> |
923 | <map> | 923 | <map> |
924 | <key>Comment</key> | 924 | <key>Comment</key> |
925 | <string>Show others clients in name tag</string> | 925 | <string>Show *others* clients in the name tag</string> |
926 | <key>Persist</key> | 926 | <key>Persist</key> |
927 | <integer>1</integer> | 927 | <integer>1</integer> |
928 | <key>Type</key> | 928 | <key>Type</key> |
@@ -930,7 +930,19 @@ | |||
930 | <key>Value</key> | 930 | <key>Value</key> |
931 | <integer>1</integer> | 931 | <integer>1</integer> |
932 | </map> | 932 | </map> |
933 | 933 | ||
934 | <key>ShowMyClientTagToOthers</key> | ||
935 | <map> | ||
936 | <key>Comment</key> | ||
937 | <string>Show my client name to other viewers capable seeing it (e.g. Emerald, Imprudence, Meerkat)</string> | ||
938 | <key>Persist</key> | ||
939 | <integer>1</integer> | ||
940 | <key>Type</key> | ||
941 | <string>Boolean</string> | ||
942 | <key>Value</key> | ||
943 | <integer>1</integer> | ||
944 | </map> | ||
945 | |||
934 | <key>DownloadClientTags</key> | 946 | <key>DownloadClientTags</key> |
935 | <map> | 947 | <map> |
936 | <key>Comment</key> | 948 | <key>Comment</key> |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index e2be0d0..e8ee2a1 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -7404,10 +7404,14 @@ void LLAgent::sendAgentSetAppearance() | |||
7404 | msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); | 7404 | msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); |
7405 | } | 7405 | } |
7406 | msg->nextBlockFast(_PREHASH_ObjectData); | 7406 | msg->nextBlockFast(_PREHASH_ObjectData); |
7407 | mAvatarObject->packTEMessage ( | 7407 | |
7408 | gMessageSystem, | 7408 | int shield = 0; |
7409 | gSavedSettings.getBOOL("ClothingLayerProtection") | 7409 | if(gSavedSettings.getBOOL("ClothingLayerProtection")) |
7410 | ); | 7410 | { |
7411 | if(gSavedSettings.getBOOL("ShowMyClientTagToOthers")) shield = 1; | ||
7412 | else shield = 2; | ||
7413 | } | ||
7414 | mAvatarObject->packTEMessage ( gMessageSystem, shield ); | ||
7411 | } | 7415 | } |
7412 | else | 7416 | else |
7413 | { | 7417 | { |
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index 22dcbf1..6fb8998 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp | |||
@@ -57,7 +57,7 @@ BOOL LLPrefsAdvanced::postBuild() | |||
57 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); | 57 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); |
58 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); | 58 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); |
59 | childSetValue("windlight_check", gSavedSettings.getBOOL("UseServersideWindlightSettings")); | 59 | childSetValue("windlight_check", gSavedSettings.getBOOL("UseServersideWindlightSettings")); |
60 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ClothingLayerProtection")); | 60 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); |
61 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); | 61 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); |
62 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); | 62 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); |
63 | childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); | 63 | childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); |
@@ -81,8 +81,16 @@ void LLPrefsAdvanced::apply() | |||
81 | gSavedSettings.setBOOL("UseServersideWindlightSettings", childGetValue("windlight_check")); | 81 | gSavedSettings.setBOOL("UseServersideWindlightSettings", childGetValue("windlight_check")); |
82 | 82 | ||
83 | // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC | 83 | // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC |
84 | if (gSavedSettings.getBOOL("ClothingLayerProtection") != (BOOL)childGetValue("client_name_tag_broadcast_check")) | 84 | if (gSavedSettings.getBOOL("ShowMyClientTagToOthers") != (BOOL)childGetValue("client_name_tag_broadcast_check")) |
85 | { | 85 | { |
86 | if(gSavedSettings.getBOOL("ShowMyClientTagToOthers")) | ||
87 | { | ||
88 | //ShowMyClientTagToOthers works only with ClothingLayerProtection true, | ||
89 | //while not showing also works with ClothingLayerProtection false. | ||
90 | //since ClothingLayerProtection true is preferrable only switch ON | ||
91 | gSavedSettings.setBOOL("ClothingLayerProtection", TRUE); | ||
92 | } | ||
93 | |||
86 | LLVOAvatar* avatar = gAgent.getAvatarObject(); | 94 | LLVOAvatar* avatar = gAgent.getAvatarObject(); |
87 | if (avatar) | 95 | if (avatar) |
88 | { | 96 | { |
@@ -91,7 +99,7 @@ void LLPrefsAdvanced::apply() | |||
91 | avatar->forceBakeAllTextures(slam_for_debug); | 99 | avatar->forceBakeAllTextures(slam_for_debug); |
92 | } | 100 | } |
93 | } | 101 | } |
94 | gSavedSettings.setBOOL("ClothingLayerProtection", childGetValue("client_name_tag_broadcast_check")); | 102 | gSavedSettings.setBOOL("ShowMyClientTagToOthers", childGetValue("client_name_tag_broadcast_check")); |
95 | 103 | ||
96 | // This is bad bad BAD UI from Emerald, I know. | 104 | // This is bad bad BAD UI from Emerald, I know. |
97 | // If anyone wants to do this better, please do -- MC | 105 | // If anyone wants to do this better, please do -- MC |