diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 134 |
1 files changed, 132 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index a2aa713..caa068d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -760,8 +760,138 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
760 | } | 760 | } |
761 | 761 | ||
762 | public double llGetRegionTimeDilation() { return 1.0f; } | 762 | public double llGetRegionTimeDilation() { return 1.0f; } |
763 | public double llGetRegionFPS() { return 10.0f; } | 763 | public double llGetRegionFPS() { return 10.0f; } |
764 | public void llParticleSystem(List<Object> rules) { NotImplemented("llParticleSystem"); } | 764 | |
765 | /* particle system rules should be coming into this routine as doubles, that is | ||
766 | rule[0] should be an integer from this list and rule[1] should be the arg | ||
767 | for the same integer. wiki.secondlife.com has most of this mapping, but some | ||
768 | came from http://www.caligari-designs.com/p4u2 | ||
769 | |||
770 | We iterate through the list for 'Count' elements, incrementing by two for each | ||
771 | iteration and set the members of Primitive.ParticleSystem, one at a time. | ||
772 | */ | ||
773 | public enum PrimitiveRule : int | ||
774 | { | ||
775 | PSYS_PART_FLAGS = 0, | ||
776 | PSYS_PART_START_COLOR = 1, | ||
777 | PSYS_PART_START_ALPHA = 2, | ||
778 | PSYS_PART_END_COLOR = 3, | ||
779 | PSYS_PART_END_ALPHA = 4, | ||
780 | PSYS_PART_START_SCALE = 5, | ||
781 | PSYS_PART_END_SCALE = 6, | ||
782 | PSYS_PART_MAX_AGE = 7, | ||
783 | PSYS_SRC_ACCEL = 8, | ||
784 | PSYS_SRC_PATTERN = 9, | ||
785 | PSYS_SRC_TEXTURE = 12, | ||
786 | PSYS_SRC_BURST_RATE = 13, | ||
787 | PSYS_SRC_BURST_PART_COUNT = 15, | ||
788 | PSYS_SRC_BURST_RADIUS = 16, | ||
789 | PSYS_SRC_BURST_SPEED_MIN = 17, | ||
790 | PSYS_SRC_BURST_SPEED_MAX = 18, | ||
791 | PSYS_SRC_MAX_AGE = 19, | ||
792 | PSYS_SRC_TARGET_KEY = 20, | ||
793 | PSYS_SRC_OMEGA = 21, | ||
794 | PSYS_SRC_ANGLE_BEGIN = 22, | ||
795 | PSYS_SRC_ANGLE_END = 23 | ||
796 | } | ||
797 | |||
798 | public void llParticleSystem(List<Object> rules) | ||
799 | { | ||
800 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); | ||
801 | for (int i = 0; i < rules.Count; i += 2) | ||
802 | { | ||
803 | switch ((int)rules[i]) | ||
804 | { | ||
805 | case (int)PrimitiveRule.PSYS_PART_FLAGS: | ||
806 | prules.PartFlags = (uint)rules[i + 1]; | ||
807 | break; | ||
808 | |||
809 | case (int)PrimitiveRule.PSYS_PART_START_COLOR: | ||
810 | prules.PartStartColor = (LLColor)rules[i + 1]; | ||
811 | break; | ||
812 | |||
813 | case (int)PrimitiveRule.PSYS_PART_START_ALPHA: | ||
814 | //what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; | ||
815 | break; | ||
816 | |||
817 | case (int)PrimitiveRule.PSYS_PART_END_COLOR: | ||
818 | prules.PartEndColor = (LLColor)rules[i + 1]; | ||
819 | break; | ||
820 | |||
821 | case (int)PrimitiveRule.PSYS_PART_END_ALPHA: | ||
822 | //what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; | ||
823 | break; | ||
824 | |||
825 | case (int)PrimitiveRule.PSYS_PART_START_SCALE: | ||
826 | //what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; | ||
827 | break; | ||
828 | |||
829 | case (int)PrimitiveRule.PSYS_PART_END_SCALE: | ||
830 | //what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; | ||
831 | break; | ||
832 | |||
833 | case (int)PrimitiveRule.PSYS_PART_MAX_AGE: | ||
834 | prules.MaxAge = (float)rules[i + 1]; | ||
835 | break; | ||
836 | |||
837 | case (int)PrimitiveRule.PSYS_SRC_ACCEL: | ||
838 | //what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; | ||
839 | break; | ||
840 | |||
841 | case (int)PrimitiveRule.PSYS_SRC_PATTERN: | ||
842 | //what is the cast? prules.PartStartColor = (LLColor)rules[i + 1]; | ||
843 | break; | ||
844 | |||
845 | case (int)PrimitiveRule.PSYS_SRC_TEXTURE: | ||
846 | prules.Texture = (LLUUID)rules[i + 1]; | ||
847 | break; | ||
848 | |||
849 | case (int)PrimitiveRule.PSYS_SRC_BURST_RATE: | ||
850 | prules.BurstRate = (float)rules[i + 1]; | ||
851 | break; | ||
852 | |||
853 | case (int)PrimitiveRule.PSYS_SRC_BURST_PART_COUNT: | ||
854 | prules.BurstPartCount = (byte)rules[i + 1]; | ||
855 | break; | ||
856 | |||
857 | case (int)PrimitiveRule.PSYS_SRC_BURST_RADIUS: | ||
858 | prules.BurstRadius = (float)rules[i + 1]; | ||
859 | break; | ||
860 | |||
861 | case (int)PrimitiveRule.PSYS_SRC_BURST_SPEED_MIN: | ||
862 | prules.BurstSpeedMin = (float)rules[i + 1]; | ||
863 | break; | ||
864 | |||
865 | case (int)PrimitiveRule.PSYS_SRC_BURST_SPEED_MAX: | ||
866 | prules.BurstSpeedMax = (float)rules[i + 1]; | ||
867 | break; | ||
868 | |||
869 | case (int)PrimitiveRule.PSYS_SRC_MAX_AGE: | ||
870 | prules.MaxAge = (float)rules[i + 1]; | ||
871 | break; | ||
872 | |||
873 | case (int)PrimitiveRule.PSYS_SRC_TARGET_KEY: | ||
874 | prules.Target = (LLUUID)rules[i + 1]; | ||
875 | break; | ||
876 | |||
877 | case (int)PrimitiveRule.PSYS_SRC_OMEGA: | ||
878 | //cast?? prules.MaxAge = (float)rules[i + 1]; | ||
879 | break; | ||
880 | |||
881 | case (int)PrimitiveRule.PSYS_SRC_ANGLE_BEGIN: | ||
882 | prules.InnerAngle = (float)rules[i + 1]; | ||
883 | break; | ||
884 | |||
885 | case (int)PrimitiveRule.PSYS_SRC_ANGLE_END: | ||
886 | prules.OuterAngle = (float)rules[i + 1]; | ||
887 | break; | ||
888 | |||
889 | } | ||
890 | } | ||
891 | |||
892 | m_host.AddNewParticleSystem(prules); | ||
893 | } | ||
894 | |||
765 | public void llGroundRepel(double height, int water, double tau) { NotImplemented("llGroundRepel"); } | 895 | public void llGroundRepel(double height, int water, double tau) { NotImplemented("llGroundRepel"); } |
766 | public void llGiveInventoryList() { NotImplemented("llGiveInventoryList"); } | 896 | public void llGiveInventoryList() { NotImplemented("llGiveInventoryList"); } |
767 | public void llSetVehicleType(int type) { NotImplemented("llSetVehicleType"); } | 897 | public void llSetVehicleType(int type) { NotImplemented("llSetVehicleType"); } |