diff options
author | Justin Clark-Casey (justincc) | 2012-01-27 23:24:49 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-27 23:24:49 +0000 |
commit | 31b87ff07b7442e2fc74936e4da0084118123285 (patch) | |
tree | 10f0b4b1690db09fc2a44ced6cd33b7dba99aa3c /OpenSim/Region | |
parent | Implement osIsNpc(key npc):integer. This return TRUE if the given key belong... (diff) | |
download | opensim-SC_OLD-31b87ff07b7442e2fc74936e4da0084118123285.zip opensim-SC_OLD-31b87ff07b7442e2fc74936e4da0084118123285.tar.gz opensim-SC_OLD-31b87ff07b7442e2fc74936e4da0084118123285.tar.bz2 opensim-SC_OLD-31b87ff07b7442e2fc74936e4da0084118123285.tar.xz |
Increment LPS script stat for OSSL functions that were not already doing this
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 034d545..a2f5c92 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -416,6 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
416 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) | 416 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) |
417 | { | 417 | { |
418 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight"); | 418 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight"); |
419 | |||
419 | return SetTerrainHeight(x, y, val); | 420 | return SetTerrainHeight(x, y, val); |
420 | } | 421 | } |
421 | 422 | ||
@@ -423,12 +424,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
423 | { | 424 | { |
424 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); | 425 | CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight"); |
425 | OSSLDeprecated("osTerrainSetHeight", "osSetTerrainHeight"); | 426 | OSSLDeprecated("osTerrainSetHeight", "osSetTerrainHeight"); |
427 | |||
426 | return SetTerrainHeight(x, y, val); | 428 | return SetTerrainHeight(x, y, val); |
427 | } | 429 | } |
428 | 430 | ||
429 | private LSL_Integer SetTerrainHeight(int x, int y, double val) | 431 | private LSL_Integer SetTerrainHeight(int x, int y, double val) |
430 | { | 432 | { |
431 | m_host.AddScriptLPS(1); | 433 | m_host.AddScriptLPS(1); |
434 | |||
432 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) | 435 | if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) |
433 | OSSLError("osSetTerrainHeight: Coordinate out of bounds"); | 436 | OSSLError("osSetTerrainHeight: Coordinate out of bounds"); |
434 | 437 | ||
@@ -468,6 +471,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
468 | public void osTerrainFlush() | 471 | public void osTerrainFlush() |
469 | { | 472 | { |
470 | CheckThreatLevel(ThreatLevel.VeryLow, "osTerrainFlush"); | 473 | CheckThreatLevel(ThreatLevel.VeryLow, "osTerrainFlush"); |
474 | m_host.AddScriptLPS(1); | ||
471 | 475 | ||
472 | ITerrainModule terrainModule = World.RequestModuleInterface<ITerrainModule>(); | 476 | ITerrainModule terrainModule = World.RequestModuleInterface<ITerrainModule>(); |
473 | if (terrainModule != null) terrainModule.TaintTerrain(); | 477 | if (terrainModule != null) terrainModule.TaintTerrain(); |
@@ -884,6 +888,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
884 | // threat level is None as we could get this information with an | 888 | // threat level is None as we could get this information with an |
885 | // in-world script as well, just not as efficient | 889 | // in-world script as well, just not as efficient |
886 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); | 890 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); |
891 | m_host.AddScriptLPS(1); | ||
887 | 892 | ||
888 | LSL_List result = new LSL_List(); | 893 | LSL_List result = new LSL_List(); |
889 | World.ForEachRootScenePresence(delegate(ScenePresence sp) | 894 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
@@ -1164,6 +1169,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1164 | // should be removed | 1169 | // should be removed |
1165 | // | 1170 | // |
1166 | CheckThreatLevel(ThreatLevel.High, "osSetStateEvents"); | 1171 | CheckThreatLevel(ThreatLevel.High, "osSetStateEvents"); |
1172 | m_host.AddScriptLPS(1); | ||
1167 | 1173 | ||
1168 | m_host.SetScriptEvents(m_itemID, events); | 1174 | m_host.SetScriptEvents(m_itemID, events); |
1169 | } | 1175 | } |
@@ -1511,7 +1517,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1511 | 1517 | ||
1512 | m_host.AddScriptLPS(1); | 1518 | m_host.AddScriptLPS(1); |
1513 | 1519 | ||
1514 | |||
1515 | ILandObject land | 1520 | ILandObject land |
1516 | = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 1521 | = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
1517 | 1522 | ||
@@ -1572,6 +1577,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1572 | // | 1577 | // |
1573 | CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); | 1578 | CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); |
1574 | m_host.AddScriptLPS(1); | 1579 | m_host.AddScriptLPS(1); |
1580 | |||
1575 | return m_ScriptEngine.World.GetSimulatorVersion(); | 1581 | return m_ScriptEngine.World.GetSimulatorVersion(); |
1576 | } | 1582 | } |
1577 | 1583 | ||
@@ -1909,6 +1915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1909 | public string osAvatarName2Key(string firstname, string lastname) | 1915 | public string osAvatarName2Key(string firstname, string lastname) |
1910 | { | 1916 | { |
1911 | CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); | 1917 | CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); |
1918 | m_host.AddScriptLPS(1); | ||
1912 | 1919 | ||
1913 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname); | 1920 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname); |
1914 | if (null == account) | 1921 | if (null == account) |
@@ -1924,6 +1931,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1924 | public string osKey2Name(string id) | 1931 | public string osKey2Name(string id) |
1925 | { | 1932 | { |
1926 | CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); | 1933 | CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); |
1934 | m_host.AddScriptLPS(1); | ||
1935 | |||
1927 | UUID key = new UUID(); | 1936 | UUID key = new UUID(); |
1928 | 1937 | ||
1929 | if (UUID.TryParse(id, out key)) | 1938 | if (UUID.TryParse(id, out key)) |
@@ -2222,12 +2231,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2222 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) | 2231 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) |
2223 | { | 2232 | { |
2224 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2233 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2234 | m_host.AddScriptLPS(1); | ||
2235 | |||
2225 | return NpcCreate(firstname, lastname, position, notecard, true); | 2236 | return NpcCreate(firstname, lastname, position, notecard, true); |
2226 | } | 2237 | } |
2227 | 2238 | ||
2228 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) | 2239 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) |
2229 | { | 2240 | { |
2230 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2241 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2242 | m_host.AddScriptLPS(1); | ||
2243 | |||
2231 | return NpcCreate(firstname, lastname, position, notecard, (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0); | 2244 | return NpcCreate(firstname, lastname, position, notecard, (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0); |
2232 | } | 2245 | } |
2233 | 2246 | ||
@@ -2285,6 +2298,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2285 | public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) | 2298 | public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) |
2286 | { | 2299 | { |
2287 | CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); | 2300 | CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); |
2301 | m_host.AddScriptLPS(1); | ||
2288 | 2302 | ||
2289 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 2303 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
2290 | 2304 | ||
@@ -2306,6 +2320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2306 | public void osNpcLoadAppearance(LSL_Key npc, string notecard) | 2320 | public void osNpcLoadAppearance(LSL_Key npc, string notecard) |
2307 | { | 2321 | { |
2308 | CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); | 2322 | CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); |
2323 | m_host.AddScriptLPS(1); | ||
2309 | 2324 | ||
2310 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 2325 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
2311 | 2326 | ||
@@ -2333,6 +2348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2333 | public LSL_Key osNpcGetOwner(LSL_Key npc) | 2348 | public LSL_Key osNpcGetOwner(LSL_Key npc) |
2334 | { | 2349 | { |
2335 | CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); | 2350 | CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); |
2351 | m_host.AddScriptLPS(1); | ||
2336 | 2352 | ||
2337 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 2353 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
2338 | if (npcModule != null) | 2354 | if (npcModule != null) |
@@ -2354,6 +2370,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2354 | public LSL_Vector osNpcGetPos(LSL_Key npc) | 2370 | public LSL_Vector osNpcGetPos(LSL_Key npc) |
2355 | { | 2371 | { |
2356 | CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); | 2372 | CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); |
2373 | m_host.AddScriptLPS(1); | ||
2357 | 2374 | ||
2358 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 2375 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
2359 | if (npcModule != null) | 2376 | if (npcModule != null) |
@@ -2375,6 +2392,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2375 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector position) | 2392 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector position) |
2376 | { | 2393 | { |
2377 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); | 2394 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); |
2395 | m_host.AddScriptLPS(1); | ||
2378 | 2396 | ||
2379 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2397 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2380 | if (module != null) | 2398 | if (module != null) |
@@ -2394,6 +2412,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2394 | public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) | 2412 | public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) |
2395 | { | 2413 | { |
2396 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); | 2414 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); |
2415 | m_host.AddScriptLPS(1); | ||
2397 | 2416 | ||
2398 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2417 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2399 | if (module != null) | 2418 | if (module != null) |
@@ -2418,6 +2437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2418 | public LSL_Rotation osNpcGetRot(LSL_Key npc) | 2437 | public LSL_Rotation osNpcGetRot(LSL_Key npc) |
2419 | { | 2438 | { |
2420 | CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); | 2439 | CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); |
2440 | m_host.AddScriptLPS(1); | ||
2421 | 2441 | ||
2422 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 2442 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
2423 | if (npcModule != null) | 2443 | if (npcModule != null) |
@@ -2441,6 +2461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2441 | public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) | 2461 | public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) |
2442 | { | 2462 | { |
2443 | CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); | 2463 | CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); |
2464 | m_host.AddScriptLPS(1); | ||
2444 | 2465 | ||
2445 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 2466 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
2446 | if (npcModule != null) | 2467 | if (npcModule != null) |
@@ -2460,6 +2481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2460 | public void osNpcStopMoveToTarget(LSL_Key npc) | 2481 | public void osNpcStopMoveToTarget(LSL_Key npc) |
2461 | { | 2482 | { |
2462 | CheckThreatLevel(ThreatLevel.VeryLow, "osNpcStopMoveTo"); | 2483 | CheckThreatLevel(ThreatLevel.VeryLow, "osNpcStopMoveTo"); |
2484 | m_host.AddScriptLPS(1); | ||
2463 | 2485 | ||
2464 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2486 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2465 | if (module != null) | 2487 | if (module != null) |
@@ -2476,6 +2498,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2476 | public void osNpcSay(LSL_Key npc, string message) | 2498 | public void osNpcSay(LSL_Key npc, string message) |
2477 | { | 2499 | { |
2478 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); | 2500 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); |
2501 | m_host.AddScriptLPS(1); | ||
2479 | 2502 | ||
2480 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2503 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2481 | if (module != null) | 2504 | if (module != null) |
@@ -2492,6 +2515,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2492 | public void osNpcSit(LSL_Key npc, LSL_Key target, int options) | 2515 | public void osNpcSit(LSL_Key npc, LSL_Key target, int options) |
2493 | { | 2516 | { |
2494 | CheckThreatLevel(ThreatLevel.High, "osNpcSit"); | 2517 | CheckThreatLevel(ThreatLevel.High, "osNpcSit"); |
2518 | m_host.AddScriptLPS(1); | ||
2495 | 2519 | ||
2496 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2520 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2497 | if (module != null) | 2521 | if (module != null) |
@@ -2508,6 +2532,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2508 | public void osNpcStand(LSL_Key npc) | 2532 | public void osNpcStand(LSL_Key npc) |
2509 | { | 2533 | { |
2510 | CheckThreatLevel(ThreatLevel.High, "osNpcStand"); | 2534 | CheckThreatLevel(ThreatLevel.High, "osNpcStand"); |
2535 | m_host.AddScriptLPS(1); | ||
2511 | 2536 | ||
2512 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2537 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2513 | if (module != null) | 2538 | if (module != null) |
@@ -2524,6 +2549,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2524 | public void osNpcRemove(LSL_Key npc) | 2549 | public void osNpcRemove(LSL_Key npc) |
2525 | { | 2550 | { |
2526 | CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); | 2551 | CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); |
2552 | m_host.AddScriptLPS(1); | ||
2527 | 2553 | ||
2528 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2554 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2529 | if (module != null) | 2555 | if (module != null) |
@@ -2540,6 +2566,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2540 | public void osNpcPlayAnimation(LSL_Key npc, string animation) | 2566 | public void osNpcPlayAnimation(LSL_Key npc, string animation) |
2541 | { | 2567 | { |
2542 | CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); | 2568 | CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); |
2569 | m_host.AddScriptLPS(1); | ||
2543 | 2570 | ||
2544 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2571 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2545 | if (module != null) | 2572 | if (module != null) |
@@ -2554,6 +2581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2554 | public void osNpcStopAnimation(LSL_Key npc, string animation) | 2581 | public void osNpcStopAnimation(LSL_Key npc, string animation) |
2555 | { | 2582 | { |
2556 | CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); | 2583 | CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); |
2584 | m_host.AddScriptLPS(1); | ||
2557 | 2585 | ||
2558 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2586 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2559 | if (module != null) | 2587 | if (module != null) |
@@ -2573,6 +2601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2573 | public LSL_Key osOwnerSaveAppearance(string notecard) | 2601 | public LSL_Key osOwnerSaveAppearance(string notecard) |
2574 | { | 2602 | { |
2575 | CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); | 2603 | CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); |
2604 | m_host.AddScriptLPS(1); | ||
2576 | 2605 | ||
2577 | return SaveAppearanceToNotecard(m_host.OwnerID, notecard); | 2606 | return SaveAppearanceToNotecard(m_host.OwnerID, notecard); |
2578 | } | 2607 | } |
@@ -2580,6 +2609,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2580 | public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard) | 2609 | public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard) |
2581 | { | 2610 | { |
2582 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAgentSaveAppearance"); | 2611 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAgentSaveAppearance"); |
2612 | m_host.AddScriptLPS(1); | ||
2583 | 2613 | ||
2584 | return SaveAppearanceToNotecard(avatarId, notecard); | 2614 | return SaveAppearanceToNotecard(avatarId, notecard); |
2585 | } | 2615 | } |
@@ -2630,6 +2660,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2630 | public LSL_Key osGetMapTexture() | 2660 | public LSL_Key osGetMapTexture() |
2631 | { | 2661 | { |
2632 | CheckThreatLevel(ThreatLevel.None, "osGetMapTexture"); | 2662 | CheckThreatLevel(ThreatLevel.None, "osGetMapTexture"); |
2663 | m_host.AddScriptLPS(1); | ||
2664 | |||
2633 | return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); | 2665 | return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); |
2634 | } | 2666 | } |
2635 | 2667 | ||
@@ -2641,6 +2673,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2641 | public LSL_Key osGetRegionMapTexture(string regionName) | 2673 | public LSL_Key osGetRegionMapTexture(string regionName) |
2642 | { | 2674 | { |
2643 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); | 2675 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); |
2676 | m_host.AddScriptLPS(1); | ||
2677 | |||
2644 | Scene scene = m_ScriptEngine.World; | 2678 | Scene scene = m_ScriptEngine.World; |
2645 | UUID key = UUID.Zero; | 2679 | UUID key = UUID.Zero; |
2646 | GridRegion region; | 2680 | GridRegion region; |
@@ -2706,6 +2740,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2706 | public void osKickAvatar(string FirstName,string SurName,string alert) | 2740 | public void osKickAvatar(string FirstName,string SurName,string alert) |
2707 | { | 2741 | { |
2708 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 2742 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
2743 | m_host.AddScriptLPS(1); | ||
2744 | |||
2709 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) | 2745 | if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) |
2710 | { | 2746 | { |
2711 | World.ForEachRootScenePresence(delegate(ScenePresence sp) | 2747 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
@@ -2840,6 +2876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2840 | public LSL_List osGetAvatarList() | 2876 | public LSL_List osGetAvatarList() |
2841 | { | 2877 | { |
2842 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); | 2878 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); |
2879 | m_host.AddScriptLPS(1); | ||
2843 | 2880 | ||
2844 | LSL_List result = new LSL_List(); | 2881 | LSL_List result = new LSL_List(); |
2845 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) | 2882 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) |
@@ -2864,6 +2901,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2864 | public LSL_String osUnixTimeToTimestamp(long time) | 2901 | public LSL_String osUnixTimeToTimestamp(long time) |
2865 | { | 2902 | { |
2866 | CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); | 2903 | CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); |
2904 | m_host.AddScriptLPS(1); | ||
2905 | |||
2867 | long baseTicks = 621355968000000000; | 2906 | long baseTicks = 621355968000000000; |
2868 | long tickResolution = 10000000; | 2907 | long tickResolution = 10000000; |
2869 | long epochTicks = (time * tickResolution) + baseTicks; | 2908 | long epochTicks = (time * tickResolution) + baseTicks; |
@@ -2872,4 +2911,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2872 | return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); | 2911 | return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); |
2873 | } | 2912 | } |
2874 | } | 2913 | } |
2875 | } | 2914 | } \ No newline at end of file |