Added blink, and Hard Blink (See the comments in llpanelobject.cpp line2081
This commit is contained in:
@@ -121,6 +121,8 @@ BOOL LLPanelObject::postBuild()
|
||||
//Blink [SimmanFederal] Inspired by VLife/Oynx
|
||||
mClickBlink = getChild<LLButton>("button blink");
|
||||
childSetAction("button blink",&onClickBlink,this);
|
||||
mClickHardBlink = getChild<LLButton>("button blink hard");
|
||||
childSetAction("button blink hard",&onClickHardBlink,this);
|
||||
|
||||
// Temporary checkbox
|
||||
mCheckTemporary = getChild<LLCheckBoxCtrl>("Temporary Checkbox Ctrl");
|
||||
@@ -388,6 +390,13 @@ void LLPanelObject::getState( )
|
||||
BOOL enable_rotate = TRUE;
|
||||
// </edit>
|
||||
|
||||
//[SimmanFederal]: Adding permission check to see if we can even BLINK anything not just atempting to blink even no mod sheit.
|
||||
//Also a link check. (lol from the orginal enable_move bool <3)
|
||||
BOOL sfBlinkOk = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
|
||||
childSetEnabled("button blink", sfBlinkOk);
|
||||
childSetEnabled("button blink hard", sfBlinkOk);
|
||||
//[/SimmanFederal]
|
||||
|
||||
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
|
||||
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
|
||||
&& (selected_count == 1);
|
||||
@@ -481,10 +490,6 @@ void LLPanelObject::getState( )
|
||||
|
||||
// </edit>
|
||||
|
||||
//<derp> Griefer Technology ~[SimmanFederal]
|
||||
childSetEnabled("button blink", root_objectp->permModify());
|
||||
//</derp>
|
||||
|
||||
// Select Single Message
|
||||
childSetVisible("select_single", FALSE);
|
||||
childSetVisible("edit_object", FALSE);
|
||||
@@ -2027,19 +2032,6 @@ void LLPanelObject::onCommitPhysics( LLUICtrl* ctrl, void* userdata )
|
||||
self->sendIsPhysical();
|
||||
}
|
||||
|
||||
//[SimmanFederal] Blinking function. Inspired by VLife/Oynx.
|
||||
void LLPanelObject::onClickBlink(void* data)
|
||||
{
|
||||
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
|
||||
if(objpos)
|
||||
{
|
||||
LLVector3 pos = objpos->getPosition();
|
||||
pos.mV[VZ] = 9001.0f;
|
||||
objpos->setPositionParent(pos);
|
||||
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelObject::onCommitTemporary( LLUICtrl* ctrl, void* userdata )
|
||||
{
|
||||
@@ -2085,6 +2077,42 @@ void LLPanelObject::onCommitSculpt( LLUICtrl* ctrl, void* userdata )
|
||||
self->sendSculpt();
|
||||
}
|
||||
|
||||
//moved the Blink code below the Commit voids, Sorry about that. ~[SimmanFederal]
|
||||
//[SimmanFederal] Blinking function. Inspired by VLife/Oynx.
|
||||
void LLPanelObject::onClickBlink(void* data)
|
||||
{
|
||||
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
|
||||
if(objpos)
|
||||
{
|
||||
//printchat("Blinking...");//yes I'm too lasy to add the system chat set up to a header
|
||||
LLVector3 pos = objpos->getPosition();//get the x and the y
|
||||
pos.mV[VZ] = 340282346638528859811704183484516925440.0f;//create the z
|
||||
objpos->setPositionParent(pos);//set the x y z
|
||||
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);//send the data
|
||||
}
|
||||
}
|
||||
|
||||
//[SimmanFederal] HARD-Blinking function. I thought about it while fapping.
|
||||
void LLPanelObject::onClickHardBlink(void* data)
|
||||
{
|
||||
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
|
||||
if(objpos)
|
||||
{
|
||||
//printchat("Hard blinking...");//yes I'm too lasy to add the system chat set up to a header
|
||||
/*
|
||||
NOTE: Temporary objects, when thrown off world/put off world,
|
||||
do not report back to the viewer, nor go to lost and found.
|
||||
|
||||
So we do selectionUpdateTemporary(1)
|
||||
*/
|
||||
LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE
|
||||
LLVector3 pos = objpos->getPosition();//get the x and the y
|
||||
pos.mV[VZ] = 340282346638528859811704183484516925440.0f;//create the z
|
||||
objpos->setPositionParent(pos);//set the x y z
|
||||
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);//send the data
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdata)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user