[Follow] Sit if target is sitting, stand when they stand
Does object and ground sitting. May fly to sitting target if they're in air Ground sits as close as it can get if cannot reach ground sitting target Optimizes following when within desired range of target Moves sitting/standing autopilot cancels to more proper places
This commit is contained in:
@@ -3897,8 +3897,6 @@ void handle_object_sit(LLViewerObject* object, const LLVector3& offset = LLVecto
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
gAgent.stopAutoPilot(true);
|
||||
|
||||
gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
@@ -3921,9 +3919,10 @@ void handle_object_sit_or_stand()
|
||||
return;
|
||||
}
|
||||
|
||||
gAgent.stopAutoPilot(true);
|
||||
|
||||
if (sitting_on_selection())
|
||||
{
|
||||
gAgent.stopAutoPilot(true);
|
||||
gAgent.standUp();
|
||||
return;
|
||||
}
|
||||
@@ -9649,6 +9648,7 @@ class ListObjectSit : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgent.stopAutoPilot(true);
|
||||
handle_object_sit(gObjectList.findObject(LFIDBearer::getActiveSelectedID()));
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user