Feature Request: Show how many scripts are actually running when doing a script count (also shows mono!)

This commit is contained in:
Inusaito Sayori
2014-06-17 11:39:03 -04:00
parent 5490a992ca
commit 1051fd9d42
5 changed files with 71 additions and 7 deletions

View File

@@ -222,6 +222,7 @@
#include "wlfPanel_AdvSettings.h" //Lower right Windlight and Rendering options
#include "lldaycyclemanager.h"
#include "llfloaterblacklist.h"
#include "scriptcounter.h"
#include "shfloatermediaticker.h"
#include "llpacketring.h"
// </edit>
@@ -2961,6 +2962,22 @@ void pass_processObjectPropertiesFamily(LLMessageSystem *msg, void**)
JCFloaterAreaSearch::processObjectPropertiesFamily(msg, NULL);
}
void process_script_running_reply(LLMessageSystem* msg, void** v)
{
LLLiveLSLEditor::processScriptRunningReply(msg, v);
if (ScriptCounter::sCheckMap.size())
{
LLUUID item_id;
msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id);
std::map<LLUUID,ScriptCounter*>::iterator it = ScriptCounter::sCheckMap.find(item_id);
if (it != ScriptCounter::sCheckMap.end())
{
it->second->processRunningReply(msg);
ScriptCounter::sCheckMap.erase(it);
}
}
}
void register_viewer_callbacks(LLMessageSystem* msg)
{
msg->setHandlerFuncFast(_PREHASH_LayerData, process_layer_data );
@@ -3011,8 +3028,7 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFuncFast(_PREHASH_CoarseLocationUpdate, LLWorld::processCoarseUpdate, NULL);
msg->setHandlerFuncFast(_PREHASH_ReplyTaskInventory, LLViewerObject::processTaskInv, NULL);
msg->setHandlerFuncFast(_PREHASH_DerezContainer, process_derez_container, NULL);
msg->setHandlerFuncFast(_PREHASH_ScriptRunningReply,
&LLLiveLSLEditor::processScriptRunningReply);
msg->setHandlerFuncFast(_PREHASH_ScriptRunningReply, process_script_running_reply);
msg->setHandlerFuncFast(_PREHASH_DeRezAck, process_derez_ack);