summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 9f2186f7f7..afd9d7b3f9 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -956,6 +956,7 @@ void LLAgent::sendMessage()
if (!mRegionp)
{
llerrs << "No region for agent yet!" << llendl;
+ return;
}
gMessageSystem->sendMessage(mRegionp->getHost());
}
@@ -4485,7 +4486,9 @@ void LLAgent::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, const LLV
{
const F64 ANIM_METERS_PER_SECOND = 10.0;
const F64 MIN_ANIM_SECONDS = 0.5;
+ const F64 MAX_ANIM_SECONDS = 10.0;
F64 anim_duration = llmax( MIN_ANIM_SECONDS, sqrt(focus_delta_squared) / ANIM_METERS_PER_SECOND );
+ anim_duration = llmin( anim_duration, MAX_ANIM_SECONDS );
setAnimationDuration( (F32)anim_duration );
}
@@ -5027,9 +5030,9 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const
}
}
-BOOL LLAgent::isInGroup(const LLUUID& group_id) const
+BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */) const
{
- if (isGodlike())
+ if (!ignore_god_mode && isGodlike())
return true;
S32 count = mGroups.count();