summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-18 13:52:07 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-18 13:52:07 +0800
commitc6048b2a8e18877f3f8bd0a7e190c553a3caa9a5 (patch)
tree5e5b921f08012b20a5ae940d4f8ac4bd95e2f444 /indra/newview/llagent.cpp
parent04081678eeaa1d56cecc1c68aa358d255addf81d (diff)
parent09a3bac9436af1b6077fb27885c8c6c645f40a8e (diff)
Merge branch 'main' into 2025.05
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 085155714a..d69fe8328d 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -385,6 +385,10 @@ LLAgent::LLAgent() :
mbRunning(false),
mbTeleportKeepsLookAt(false),
+ mAllowedToStand(true),
+ mAllowedToSit(true),
+ mSitObjectID(LLUUID::null),
+
mAgentAccess(new LLAgentAccess(gSavedSettings)),
mGodLevelChangeSignal(),
mCanEditParcel(false),
@@ -961,7 +965,11 @@ bool LLAgent::isSitting()
void LLAgent::standUp()
{
- setControlFlags(AGENT_CONTROL_STAND_UP);
+ if (mAllowedToStand)
+ {
+ setControlFlags(AGENT_CONTROL_STAND_UP);
+ mSitObjectID = LLUUID::null;
+ }
}
void LLAgent::changeParcels()
@@ -1324,7 +1332,7 @@ LLVector3d LLAgent::getPosGlobalFromAgent(const LLVector3 &pos_agent) const
void LLAgent::sitDown()
{
- setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
+ if (mAllowedToSit) setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
}
//-----------------------------------------------------------------------------