Address Issue 1290: Bumps recorded in chat window
Adds debug setting AnnounceBumps and a toggle in Preferences->System->Security
This commit is contained in:
@@ -1324,6 +1324,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AnnounceBumps</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Announce if someone bumps into you.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>AnnounceSnapshots</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -252,6 +252,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt");
|
||||
mShowLookAt = gSavedSettings.getBOOL("AscentShowLookAt");
|
||||
mQuietSnapshotsToDisk = gSavedSettings.getBOOL("QuietSnapshotsToDisk");
|
||||
mAnnounceBumps = gSavedSettings.getBOOL("AnnounceBumps");
|
||||
mDetachBridge = gSavedSettings.getBOOL("SGDetachBridge");
|
||||
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
|
||||
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
|
||||
@@ -409,6 +410,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("PrivateLookAt", mPrivateLookAt);
|
||||
gSavedSettings.setBOOL("AscentShowLookAt", mShowLookAt);
|
||||
gSavedSettings.setBOOL("QuietSnapshotsToDisk", mQuietSnapshotsToDisk);
|
||||
gSavedSettings.setBOOL("AnnounceBumps", mAnnounceBumps);
|
||||
gSavedSettings.setBOOL("SGDetachBridge", mDetachBridge);
|
||||
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
|
||||
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);
|
||||
|
||||
@@ -103,6 +103,7 @@ private:
|
||||
bool mPrivateLookAt;
|
||||
bool mShowLookAt;
|
||||
bool mQuietSnapshotsToDisk;
|
||||
bool mAnnounceBumps;
|
||||
bool mDetachBridge;
|
||||
bool mRevokePermsOnStandUp;
|
||||
bool mDisableClickSit;
|
||||
|
||||
@@ -6915,6 +6915,32 @@ void mean_name_callback(const LLUUID &id, const std::string& full_name, bool is_
|
||||
}
|
||||
}
|
||||
|
||||
void chat_mean_collision(const LLUUID& id, const LLAvatarName& avname, const EMeanCollisionType& type, const F32& mag)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
if (type == MEAN_BUMP)
|
||||
args["ACT"] = LLTrans::getString("bump");
|
||||
else if (type == MEAN_LLPUSHOBJECT)
|
||||
args["ACT"] = LLTrans::getString("llpushobject");
|
||||
else if (type == MEAN_SELECTED_OBJECT_COLLIDE)
|
||||
args["ACT"] = LLTrans::getString("selected_object_collide");
|
||||
else if (type == MEAN_SCRIPTED_OBJECT_COLLIDE)
|
||||
args["ACT"] = LLTrans::getString("scripted_object_collide");
|
||||
else if (type == MEAN_PHYSICAL_OBJECT_COLLIDE)
|
||||
args["ACT"] = LLTrans::getString("physical_object_collide");
|
||||
else
|
||||
return; // How did we get here? I used to know you so well.
|
||||
std::string name;
|
||||
LLAvatarNameCache::getPNSName(avname, name);
|
||||
args["NAME"] = name;
|
||||
args["MAG"] = llformat("%f", mag);
|
||||
LLChat chat(LLTrans::getString("BumpedYou", args));
|
||||
chat.mFromName = name;
|
||||
chat.mURL = llformat("secondlife:///app/agent/%s/about", id.asString().c_str());
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
|
||||
void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **user_data)
|
||||
{
|
||||
if (gAgent.inPrelude())
|
||||
@@ -6944,6 +6970,8 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
|
||||
msgsystem->getU8Fast(_PREHASH_MeanCollision, _PREHASH_Type, u8type);
|
||||
|
||||
type = (EMeanCollisionType)u8type;
|
||||
static const LLCachedControl<bool> chat_collision("AnnounceBumps");
|
||||
if (chat_collision) LLAvatarNameCache::get(perp, boost::bind(chat_mean_collision, _1, _2, type, mag));
|
||||
|
||||
BOOL b_found = FALSE;
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<check_box bottom_delta="-20" control_name="DisablePointAtAndBeam" follows="top" initial_value="true" label="Disable Point At And Beam" tool_tip="Don't point at or show your edit beam when selecting an object." name="disable_point_at_and_beams_check"/>
|
||||
<check_box bottom_delta="-20" control_name="PrivateLookAt" follows="top" initial_value="false" label="Do not Look At objects and/or avatars" tool_tip="Disables headturns and lookat beacons, causing your avatar to look straight ahead (unless scripted to do otherwise)." name="private_look_at_check"/>
|
||||
<check_box bottom_delta="-20" control_name="AscentShowLookAt" follows="top" initial_value="false" label="Show others' LookAt beacons" tool_tip="Shows you where others are looking." name="show_look_at_check"/>
|
||||
<check_box bottom_delta="-20" control_name="AnnounceBumps" follows="top" label="Announce in chat when people bump you" name="announce_bumps"/>
|
||||
<check_box bottom_delta="-20" control_name="SGDetachBridge" follows="top" initial_value="false" label="Auto detach LSL Bridge" tool_tip="Automatically detach LSL Bridge of Phoenix or Firestorm viewer." name="detach_bridge"/>
|
||||
<check_box bottom_delta="-20" control_name="QuietSnapshotsToDisk" follows="top" initial_value="false" label="Quiet Snapshots to Disk" tool_tip="Doesn't make a camera sound nor alert everyone when you take a snapshot to your computer." name="quiet_snapshots_check"/>
|
||||
<check_box bottom_delta="-20" control_name="RevokePermsOnStandUp" follows="top" initial_value="false" label="On standing up, revoke perms for the object your avatar was sitting on" tool_tip="Objects generally retain Take Control and Trigger Animation permissions until reset or given permission by another user. Enabling this will make sure you revoke these permissions immediately." name="revoke_perms_on_stand_up_check"/>
|
||||
|
||||
@@ -352,6 +352,15 @@ Make sure you entered the correct Login URI. An example of a Login URI is: \"htt
|
||||
<string name="ScriptReturnObjects">Return objects on your behalf</string>
|
||||
<string name="UnknownScriptPermission">(unknown)!</string>
|
||||
|
||||
<!-- Bumps in chat -->
|
||||
<string name="BumpedYou">[NAME] [ACT] with magnitude [MAG]</string>
|
||||
<!-- [ACT]s -->
|
||||
<string name="bump">bumped you</string>
|
||||
<string name="llpushobject">pushed you with a script</string>
|
||||
<string name="selected_object_collide">hit you with an object</string>
|
||||
<string name="scripted_object_collide">hit you with a scripted object</string>
|
||||
<string name="physical_object_collide">hit you with a physical object</string>
|
||||
|
||||
|
||||
<!-- Sim Access labels -->
|
||||
<string name="SIM_ACCESS_PG">PG</string>
|
||||
|
||||
Reference in New Issue
Block a user