Update MotionAgent.cpp