diff options
author | UbitUmarov | 2016-12-15 15:14:12 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-15 15:14:12 +0000 |
commit | 48efbeb8d346a104d673c69eeb03c70abf840178 (patch) | |
tree | 9cf1931fb5b43d86a9790e12cf4d79e3dc08a7ed /OpenSim/Region/ClientStack | |
parent | respective .ini settings (diff) | |
download | opensim-SC_OLD-48efbeb8d346a104d673c69eeb03c70abf840178.zip opensim-SC_OLD-48efbeb8d346a104d673c69eeb03c70abf840178.tar.gz opensim-SC_OLD-48efbeb8d346a104d673c69eeb03c70abf840178.tar.bz2 opensim-SC_OLD-48efbeb8d346a104d673c69eeb03c70abf840178.tar.xz |
set pbs shape acording to mesh number of (material) faces
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 6873325..14a4873 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -994,7 +994,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
994 | 994 | ||
995 | pbs.TextureEntry = textureEntry.GetBytes(); | 995 | pbs.TextureEntry = textureEntry.GetBytes(); |
996 | 996 | ||
997 | bool hasmesh = false; | ||
998 | if (inner_instance_list.ContainsKey("mesh")) // seems to happen always but ... | 997 | if (inner_instance_list.ContainsKey("mesh")) // seems to happen always but ... |
999 | { | 998 | { |
1000 | int meshindx = inner_instance_list["mesh"].AsInteger(); | 999 | int meshindx = inner_instance_list["mesh"].AsInteger(); |
@@ -1004,10 +1003,34 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1004 | pbs.SculptType = (byte)SculptType.Mesh; | 1003 | pbs.SculptType = (byte)SculptType.Mesh; |
1005 | pbs.SculptTexture = meshAssets[meshindx]; // actual asset UUID after meshs suport introduction | 1004 | pbs.SculptTexture = meshAssets[meshindx]; // actual asset UUID after meshs suport introduction |
1006 | // data will be requested from asset on rez (i hope) | 1005 | // data will be requested from asset on rez (i hope) |
1007 | hasmesh = true; | ||
1008 | } | 1006 | } |
1009 | } | 1007 | } |
1010 | 1008 | ||
1009 | // faces number to pbs shape | ||
1010 | switch(face_list.Count) | ||
1011 | { | ||
1012 | case 1: | ||
1013 | case 2: | ||
1014 | pbs.ProfileCurve = (byte)ProfileCurve.Circle; | ||
1015 | pbs.PathCurve = (byte)PathCurve.Circle; | ||
1016 | break; | ||
1017 | |||
1018 | case 3: | ||
1019 | case 4: | ||
1020 | pbs.ProfileCurve = (byte)ProfileCurve.Circle; | ||
1021 | pbs.PathCurve = (byte)PathCurve.Line; | ||
1022 | break; | ||
1023 | case 5: | ||
1024 | pbs.ProfileCurve = (byte)ProfileCurve.EqualTriangle; | ||
1025 | pbs.PathCurve = (byte)PathCurve.Line; | ||
1026 | break; | ||
1027 | |||
1028 | default: | ||
1029 | pbs.ProfileCurve = (byte)ProfileCurve.Square; | ||
1030 | pbs.PathCurve = (byte)PathCurve.Line; | ||
1031 | break; | ||
1032 | } | ||
1033 | |||
1011 | Vector3 position = inner_instance_list["position"].AsVector3(); | 1034 | Vector3 position = inner_instance_list["position"].AsVector3(); |
1012 | Quaternion rotation = inner_instance_list["rotation"].AsQuaternion(); | 1035 | Quaternion rotation = inner_instance_list["rotation"].AsQuaternion(); |
1013 | 1036 | ||
@@ -1018,23 +1041,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1018 | // int material = inner_instance_list["material"].AsInteger(); | 1041 | // int material = inner_instance_list["material"].AsInteger(); |
1019 | byte material = (byte)Material.Wood; | 1042 | byte material = (byte)Material.Wood; |
1020 | 1043 | ||
1021 | // no longer used - begin ------------------------ | ||
1022 | // int mesh = inner_instance_list["mesh"].AsInteger(); | ||
1023 | |||
1024 | // OSDMap permissions = (OSDMap)inner_instance_list["permissions"]; | ||
1025 | // int base_mask = permissions["base_mask"].AsInteger(); | ||
1026 | // int everyone_mask = permissions["everyone_mask"].AsInteger(); | ||
1027 | // UUID creator_id = permissions["creator_id"].AsUUID(); | ||
1028 | // UUID group_id = permissions["group_id"].AsUUID(); | ||
1029 | // int group_mask = permissions["group_mask"].AsInteger(); | ||
1030 | // bool is_owner_group = permissions["is_owner_group"].AsBoolean(); | ||
1031 | // UUID last_owner_id = permissions["last_owner_id"].AsUUID(); | ||
1032 | // int next_owner_mask = permissions["next_owner_mask"].AsInteger(); | ||
1033 | // UUID owner_id = permissions["owner_id"].AsUUID(); | ||
1034 | // int owner_mask = permissions["owner_mask"].AsInteger(); | ||
1035 | // no longer used - end ------------------------ | ||
1036 | |||
1037 | |||
1038 | SceneObjectPart prim | 1044 | SceneObjectPart prim |
1039 | = new SceneObjectPart(owner_id, pbs, position, Quaternion.Identity, Vector3.Zero); | 1045 | = new SceneObjectPart(owner_id, pbs, position, Quaternion.Identity, Vector3.Zero); |
1040 | 1046 | ||