Speed up of particular inefficient part related to motions.
For these standard motions, the viewer likes to very frequently flood-call startMotion/stopMotion sometimes, which at the very least needs a LLUUID lookup in a std::map. In particular, this is done for two of them for every avatar in the sim every frame. This code makes it possible to test if that makes sense by merely doing a bit test. Conflicts: indra/llcharacter/llkeyframemotion.h
This commit is contained in:
@@ -314,8 +314,8 @@ void LLPhysicsMotion::getString(std::ostringstream &oss)
|
||||
}
|
||||
}
|
||||
|
||||
LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) :
|
||||
LLMotion(id),
|
||||
LLPhysicsMotionController::LLPhysicsMotionController(LLUUID const& id, LLMotionController& controller) :
|
||||
AIMaskedMotion(id, controller, ANIM_AGENT_PHYSICS_MOTION),
|
||||
mCharacter(NULL),
|
||||
mIsDefault(true)
|
||||
{
|
||||
@@ -332,15 +332,6 @@ LLPhysicsMotionController::~LLPhysicsMotionController()
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPhysicsMotionController::onActivate()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLPhysicsMotionController::onDeactivate()
|
||||
{
|
||||
}
|
||||
|
||||
LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter *character)
|
||||
{
|
||||
mCharacter = character;
|
||||
@@ -889,4 +880,4 @@ void LLPhysicsMotion::reset()
|
||||
mCharacter->setVisualParamWeight((*iter).mParam,(*iter).mParam->getDefaultWeight());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user