diff options
author | Melanie | 2011-04-06 09:22:55 +0100 |
---|---|---|
committer | Melanie | 2011-04-06 09:22:55 +0100 |
commit | 407c2b182303d3bc1214e71f407bddc28c671a55 (patch) | |
tree | e9658864b8dcad3c2dced73e97b505941576de9b /OpenSim/Region/ScriptEngine | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Change some text to make the autoreturn mechanism more obvious, and align wit... (diff) | |
download | opensim-SC-407c2b182303d3bc1214e71f407bddc28c671a55.zip opensim-SC-407c2b182303d3bc1214e71f407bddc28c671a55.tar.gz opensim-SC-407c2b182303d3bc1214e71f407bddc28c671a55.tar.bz2 opensim-SC-407c2b182303d3bc1214e71f407bddc28c671a55.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 73 |
1 files changed, 26 insertions, 47 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index ea38427..c0b490a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10472,63 +10472,42 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10472 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) | 10472 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) |
10473 | { | 10473 | { |
10474 | m_host.AddScriptLPS(1); | 10474 | m_host.AddScriptLPS(1); |
10475 | |||
10476 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | ||
10475 | 10477 | ||
10476 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | 10478 | if (lo == null) |
10477 | |||
10478 | if (land == null) | ||
10479 | { | ||
10480 | return 0; | 10479 | return 0; |
10481 | } | 10480 | |
10481 | IPrimCounts pc = lo.PrimCounts; | ||
10482 | 10482 | ||
10483 | else | 10483 | if (sim_wide != ScriptBaseClass.FALSE) |
10484 | { | 10484 | { |
10485 | if (sim_wide != 0) | 10485 | if (category == ScriptBaseClass.PARCEL_COUNT_TOTAL) |
10486 | { | 10486 | { |
10487 | if (category == 0) | 10487 | return pc.Simulator; |
10488 | { | ||
10489 | return land.SimwidePrims; | ||
10490 | } | ||
10491 | |||
10492 | else | ||
10493 | { | ||
10494 | //public int simwideArea = 0; | ||
10495 | return 0; | ||
10496 | } | ||
10497 | } | 10488 | } |
10498 | |||
10499 | else | 10489 | else |
10500 | { | 10490 | { |
10501 | if (category == 0)//Total Prims | 10491 | // counts not implemented yet |
10502 | { | 10492 | return 0; |
10503 | return 0;//land. | ||
10504 | } | ||
10505 | |||
10506 | else if (category == 1)//Owner Prims | ||
10507 | { | ||
10508 | return land.OwnerPrims; | ||
10509 | } | ||
10510 | |||
10511 | else if (category == 2)//Group Prims | ||
10512 | { | ||
10513 | return land.GroupPrims; | ||
10514 | } | ||
10515 | |||
10516 | else if (category == 3)//Other Prims | ||
10517 | { | ||
10518 | return land.OtherPrims; | ||
10519 | } | ||
10520 | |||
10521 | else if (category == 4)//Selected | ||
10522 | { | ||
10523 | return land.SelectedPrims; | ||
10524 | } | ||
10525 | |||
10526 | else if (category == 5)//Temp | ||
10527 | { | ||
10528 | return 0;//land. | ||
10529 | } | ||
10530 | } | 10493 | } |
10531 | } | 10494 | } |
10495 | else | ||
10496 | { | ||
10497 | if (category == ScriptBaseClass.PARCEL_COUNT_TOTAL) | ||
10498 | return pc.Total; | ||
10499 | else if (category == ScriptBaseClass.PARCEL_COUNT_OWNER) | ||
10500 | return pc.Owner; | ||
10501 | else if (category == ScriptBaseClass.PARCEL_COUNT_GROUP) | ||
10502 | return pc.Group; | ||
10503 | else if (category == ScriptBaseClass.PARCEL_COUNT_OTHER) | ||
10504 | return pc.Others; | ||
10505 | else if (category == ScriptBaseClass.PARCEL_COUNT_SELECTED) | ||
10506 | return pc.Selected; | ||
10507 | else if (category == ScriptBaseClass.PARCEL_COUNT_TEMP) | ||
10508 | return 0; // counts not implemented yet | ||
10509 | } | ||
10510 | |||
10532 | return 0; | 10511 | return 0; |
10533 | } | 10512 | } |
10534 | 10513 | ||