aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs257
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs32
4 files changed, 227 insertions, 72 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e77425a..a421484 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1182,7 +1182,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1182 1182
1183 if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB) == ScriptBaseClass.STATUS_BLOCK_GRAB) 1183 if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB) == ScriptBaseClass.STATUS_BLOCK_GRAB)
1184 { 1184 {
1185 NotImplemented("llSetStatus - STATUS_BLOCK_GRAB"); 1185 if (value != 0)
1186 m_host.SetBlockGrab(true);
1187 else
1188 m_host.SetBlockGrab(false);
1186 } 1189 }
1187 1190
1188 if ((status & ScriptBaseClass.STATUS_DIE_AT_EDGE) == ScriptBaseClass.STATUS_DIE_AT_EDGE) 1191 if ((status & ScriptBaseClass.STATUS_DIE_AT_EDGE) == ScriptBaseClass.STATUS_DIE_AT_EDGE)
@@ -1195,12 +1198,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1195 1198
1196 if ((status & ScriptBaseClass.STATUS_RETURN_AT_EDGE) == ScriptBaseClass.STATUS_RETURN_AT_EDGE) 1199 if ((status & ScriptBaseClass.STATUS_RETURN_AT_EDGE) == ScriptBaseClass.STATUS_RETURN_AT_EDGE)
1197 { 1200 {
1198 NotImplemented("llSetStatus - STATUS_RETURN_AT_EDGE"); 1201 if (value != 0)
1202 m_host.SetReturnAtEdge(true);
1203 else
1204 m_host.SetReturnAtEdge(false);
1199 } 1205 }
1200 1206
1201 if ((status & ScriptBaseClass.STATUS_SANDBOX) == ScriptBaseClass.STATUS_SANDBOX) 1207 if ((status & ScriptBaseClass.STATUS_SANDBOX) == ScriptBaseClass.STATUS_SANDBOX)
1202 { 1208 {
1203 NotImplemented("llSetStatus - STATUS_SANDBOX"); 1209 if (value != 0)
1210 m_host.SetStatusSandbox(true);
1211 else
1212 m_host.SetStatusSandbox(false);
1204 } 1213 }
1205 1214
1206 if (statusrotationaxis != 0) 1215 if (statusrotationaxis != 0)
@@ -1237,8 +1246,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1237 return 0; 1246 return 0;
1238 1247
1239 case ScriptBaseClass.STATUS_BLOCK_GRAB: 1248 case ScriptBaseClass.STATUS_BLOCK_GRAB:
1240 NotImplemented("llGetStatus - STATUS_BLOCK_GRAB"); 1249 if (m_host.GetBlockGrab())
1241 return 0; 1250 return 1;
1251 else
1252 return 0;
1242 1253
1243 case ScriptBaseClass.STATUS_DIE_AT_EDGE: 1254 case ScriptBaseClass.STATUS_DIE_AT_EDGE:
1244 if (m_host.GetDieAtEdge()) 1255 if (m_host.GetDieAtEdge())
@@ -1247,24 +1258,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1247 return 0; 1258 return 0;
1248 1259
1249 case ScriptBaseClass.STATUS_RETURN_AT_EDGE: 1260 case ScriptBaseClass.STATUS_RETURN_AT_EDGE:
1250 NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE"); 1261 if (m_host.GetReturnAtEdge())
1251 return 0; 1262 return 1;
1263 else
1264 return 0;
1252 1265
1253 case ScriptBaseClass.STATUS_ROTATE_X: 1266 case ScriptBaseClass.STATUS_ROTATE_X:
1254 NotImplemented("llGetStatus - STATUS_ROTATE_X"); 1267 if (m_host.GetAxisRotation(2) == 2)
1255 return 0; 1268 return 1;
1269 else
1270 return 0;
1256 1271
1257 case ScriptBaseClass.STATUS_ROTATE_Y: 1272 case ScriptBaseClass.STATUS_ROTATE_Y:
1258 NotImplemented("llGetStatus - STATUS_ROTATE_Y"); 1273 if (m_host.GetAxisRotation(4) == 4)
1259 return 0; 1274 return 1;
1275 else
1276 return 0;
1260 1277
1261 case ScriptBaseClass.STATUS_ROTATE_Z: 1278 case ScriptBaseClass.STATUS_ROTATE_Z:
1262 NotImplemented("llGetStatus - STATUS_ROTATE_Z"); 1279 if (m_host.GetAxisRotation(8) == 8)
1263 return 0; 1280 return 1;
1281 else
1282 return 0;
1264 1283
1265 case ScriptBaseClass.STATUS_SANDBOX: 1284 case ScriptBaseClass.STATUS_SANDBOX:
1266 NotImplemented("llGetStatus - STATUS_SANDBOX"); 1285 if (m_host.GetStatusSandbox())
1267 return 0; 1286 return 1;
1287 else
1288 return 0;
1268 } 1289 }
1269 return 0; 1290 return 0;
1270 } 1291 }
@@ -2202,7 +2223,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2202 m_host.AddScriptLPS(1); 2223 m_host.AddScriptLPS(1);
2203 2224
2204 // send the sound, once, to all clients in range 2225 // send the sound, once, to all clients in range
2205 m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0); 2226 m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, false, false);
2206 } 2227 }
2207 2228
2208 // Xantor 20080528 we should do this differently. 2229 // Xantor 20080528 we should do this differently.
@@ -2232,42 +2253,98 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2232 public void llLoopSoundMaster(string sound, double volume) 2253 public void llLoopSoundMaster(string sound, double volume)
2233 { 2254 {
2234 m_host.AddScriptLPS(1); 2255 m_host.AddScriptLPS(1);
2235 NotImplemented("llLoopSoundMaster"); 2256 m_host.ParentGroup.LoopSoundMasterPrim = m_host;
2257 lock (m_host.ParentGroup.LoopSoundSlavePrims)
2258 {
2259 foreach (SceneObjectPart prim in m_host.ParentGroup.LoopSoundSlavePrims)
2260 {
2261 if (prim.Sound != UUID.Zero)
2262 llStopSound();
2263
2264 prim.Sound = KeyOrName(sound);
2265 prim.SoundGain = volume;
2266 prim.SoundFlags = 1; // looping
2267 prim.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
2268
2269 prim.ScheduleFullUpdate();
2270 prim.SendFullUpdateToAllClients();
2271 }
2272 }
2273 if (m_host.Sound != UUID.Zero)
2274 llStopSound();
2275
2276 m_host.Sound = KeyOrName(sound);
2277 m_host.SoundGain = volume;
2278 m_host.SoundFlags = 1; // looping
2279 m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
2280
2281 m_host.ScheduleFullUpdate();
2282 m_host.SendFullUpdateToAllClients();
2236 } 2283 }
2237 2284
2238 public void llLoopSoundSlave(string sound, double volume) 2285 public void llLoopSoundSlave(string sound, double volume)
2239 { 2286 {
2240 m_host.AddScriptLPS(1); 2287 m_host.AddScriptLPS(1);
2241 NotImplemented("llLoopSoundSlave"); 2288 lock (m_host.ParentGroup.LoopSoundSlavePrims)
2289 {
2290 m_host.ParentGroup.LoopSoundSlavePrims.Add(m_host);
2291 }
2242 } 2292 }
2243 2293
2244 public void llPlaySoundSlave(string sound, double volume) 2294 public void llPlaySoundSlave(string sound, double volume)
2245 { 2295 {
2246 m_host.AddScriptLPS(1); 2296 m_host.AddScriptLPS(1);
2247 NotImplemented("llPlaySoundSlave"); 2297
2298 // send the sound, once, to all clients in range
2299 m_host.SendSound(KeyOrName(sound).ToString(), volume, false, 0, 0, true, false);
2248 } 2300 }
2249 2301
2250 public void llTriggerSound(string sound, double volume) 2302 public void llTriggerSound(string sound, double volume)
2251 { 2303 {
2252 m_host.AddScriptLPS(1); 2304 m_host.AddScriptLPS(1);
2253 // send the sound, once, to all clients in range 2305 // send the sound, once, to all clients in range
2254 m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0); 2306 m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, 0, false, false);
2255 } 2307 }
2256 2308
2257 // Xantor 20080528: Clear prim data of sound instead 2309 // Xantor 20080528: Clear prim data of sound instead
2258 public void llStopSound() 2310 public void llStopSound()
2259 { 2311 {
2260 m_host.AddScriptLPS(1); 2312 m_host.AddScriptLPS(1);
2261 2313 if (m_host.ParentGroup.LoopSoundSlavePrims.Contains(m_host))
2262 m_host.Sound = UUID.Zero; 2314 {
2263 m_host.SoundGain = 0; 2315 if (m_host.ParentGroup.LoopSoundMasterPrim == m_host)
2264 m_host.SoundFlags = 0; 2316 {
2265 m_host.SoundRadius = 0; 2317 foreach (SceneObjectPart part in m_host.ParentGroup.LoopSoundSlavePrims)
2266 2318 {
2267 m_host.ScheduleFullUpdate(); 2319 part.Sound = UUID.Zero;
2268 m_host.SendFullUpdateToAllClients(); 2320 part.SoundGain = 0;
2269 2321 part.SoundFlags = 0;
2270 // m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2); 2322 part.SoundRadius = 0;
2323 part.ScheduleFullUpdate();
2324 part.SendFullUpdateToAllClients();
2325 }
2326 m_host.ParentGroup.LoopSoundMasterPrim = null;
2327 m_host.ParentGroup.LoopSoundSlavePrims.Clear();
2328 }
2329 else
2330 {
2331 m_host.Sound = UUID.Zero;
2332 m_host.SoundGain = 0;
2333 m_host.SoundFlags = 0;
2334 m_host.SoundRadius = 0;
2335 m_host.ScheduleFullUpdate();
2336 m_host.SendFullUpdateToAllClients();
2337 }
2338 }
2339 else
2340 {
2341 m_host.Sound = UUID.Zero;
2342 m_host.SoundGain = 0;
2343 m_host.SoundFlags = 0;
2344 m_host.SoundRadius = 0;
2345 m_host.ScheduleFullUpdate();
2346 m_host.SendFullUpdateToAllClients();
2347 }
2271 } 2348 }
2272 2349
2273 public void llPreloadSound(string sound) 2350 public void llPreloadSound(string sound)
@@ -2661,8 +2738,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2661 2738
2662 public void llLookAt(LSL_Vector target, double strength, double damping) 2739 public void llLookAt(LSL_Vector target, double strength, double damping)
2663 { 2740 {
2664 // partial implementation, rotates objects correctly but does not apply strength or damping attributes
2665
2666 m_host.AddScriptLPS(1); 2741 m_host.AddScriptLPS(1);
2667 // Determine where we are looking from 2742 // Determine where we are looking from
2668 LSL_Vector from = llGetPos(); 2743 LSL_Vector from = llGetPos();
@@ -2682,9 +2757,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2682 // the angles of rotation in radians into rotation value 2757 // the angles of rotation in radians into rotation value
2683 2758
2684 LSL_Types.Quaternion rot = llEuler2Rot(angle); 2759 LSL_Types.Quaternion rot = llEuler2Rot(angle);
2685 2760 Quaternion rotation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
2761 m_host.startLookAt(rotation, (float)damping, (float)strength);
2686 // Orient the object to the angle calculated 2762 // Orient the object to the angle calculated
2687 llSetRot(rot); 2763 //llSetRot(rot);
2688 } 2764 }
2689 2765
2690 public void llStopLookAt() 2766 public void llStopLookAt()
@@ -3046,8 +3122,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3046 public void llRotLookAt(LSL_Rotation target, double strength, double damping) 3122 public void llRotLookAt(LSL_Rotation target, double strength, double damping)
3047 { 3123 {
3048 m_host.AddScriptLPS(1); 3124 m_host.AddScriptLPS(1);
3049// NotImplemented("llRotLookAt"); 3125 Quaternion rot = new Quaternion((float)target.x, (float)target.y, (float)target.z, (float)target.s);
3050 m_host.RotLookAt(Rot2Quaternion(target), (float)strength, (float)damping); 3126 m_host.RotLookAt(rot, (float)strength, (float)damping);
3051 } 3127 }
3052 3128
3053 public LSL_Integer llStringLength(string str) 3129 public LSL_Integer llStringLength(string str)
@@ -3145,13 +3221,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3145 public void llPointAt(LSL_Vector pos) 3221 public void llPointAt(LSL_Vector pos)
3146 { 3222 {
3147 m_host.AddScriptLPS(1); 3223 m_host.AddScriptLPS(1);
3148 NotImplemented("llPointAt"); 3224 ScenePresence Owner = World.GetScenePresence(m_host.UUID);
3225 LSL_Rotation rot = llEuler2Rot(pos);
3226 Owner.PreviousRotation = Owner.Rotation;
3227 Owner.Rotation = (new Quaternion((float)rot.x,(float)rot.y,(float)rot.z,(float)rot.s));
3149 } 3228 }
3150 3229
3151 public void llStopPointAt() 3230 public void llStopPointAt()
3152 { 3231 {
3153 m_host.AddScriptLPS(1); 3232 m_host.AddScriptLPS(1);
3154 NotImplemented("llStopPointAt"); 3233 ScenePresence Owner = m_host.ParentGroup.Scene.GetScenePresence(m_host.OwnerID);
3234 Owner.Rotation = Owner.PreviousRotation;
3155 } 3235 }
3156 3236
3157 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) 3237 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
@@ -3946,8 +4026,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3946 public void llCollisionSound(string impact_sound, double impact_volume) 4026 public void llCollisionSound(string impact_sound, double impact_volume)
3947 { 4027 {
3948 m_host.AddScriptLPS(1); 4028 m_host.AddScriptLPS(1);
3949 //NotImplemented("llCollisionSound");
3950
3951 // TODO: Parameter check logic required. 4029 // TODO: Parameter check logic required.
3952 UUID soundId = UUID.Zero; 4030 UUID soundId = UUID.Zero;
3953 if (!UUID.TryParse(impact_sound, out soundId)) 4031 if (!UUID.TryParse(impact_sound, out soundId))
@@ -4535,8 +4613,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4535 public LSL_Vector llGetCenterOfMass() 4613 public LSL_Vector llGetCenterOfMass()
4536 { 4614 {
4537 m_host.AddScriptLPS(1); 4615 m_host.AddScriptLPS(1);
4538 NotImplemented("llGetCenterOfMass"); 4616 Vector3 center = m_host.GetGeometricCenter();
4539 return new LSL_Vector(); 4617 return new LSL_Vector(center.X,center.Y,center.Z);
4540 } 4618 }
4541 4619
4542 public LSL_List llListSort(LSL_List src, int stride, int ascending) 4620 public LSL_List llListSort(LSL_List src, int stride, int ascending)
@@ -5269,8 +5347,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5269 flags |= ScriptBaseClass.AGENT_SITTING; 5347 flags |= ScriptBaseClass.AGENT_SITTING;
5270 } 5348 }
5271 5349
5272 //NotImplemented("llGetAgentInfo");
5273
5274 return flags; 5350 return flags;
5275 } 5351 }
5276 5352
@@ -5353,7 +5429,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5353 LSL_Vector bottom_south_west) 5429 LSL_Vector bottom_south_west)
5354 { 5430 {
5355 m_host.AddScriptLPS(1); 5431 m_host.AddScriptLPS(1);
5356 NotImplemented("llTriggerSoundLimited"); 5432 float radius1 = (float)llVecDist(llGetPos(), top_north_east);
5433 float radius2 = (float)llVecDist(llGetPos(), bottom_south_west);
5434 float radius = Math.Abs(radius1 - radius2);
5435 m_host.SendSound(KeyOrName(sound).ToString(), volume, true, 0, radius, false, false);
5357 } 5436 }
5358 5437
5359 public void llEjectFromLand(string pest) 5438 public void llEjectFromLand(string pest)
@@ -5892,7 +5971,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5892 public void llGroundRepel(double height, int water, double tau) 5971 public void llGroundRepel(double height, int water, double tau)
5893 { 5972 {
5894 m_host.AddScriptLPS(1); 5973 m_host.AddScriptLPS(1);
5895 NotImplemented("llGroundRepel"); 5974 if (m_host.PhysActor != null)
5975 {
5976 float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0));
5977 float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
5978 PIDHoverType hoverType = PIDHoverType.Ground;
5979 if (water != 0)
5980 {
5981 hoverType = PIDHoverType.GroundAndWater;
5982 if (ground < waterLevel)
5983 height += waterLevel;
5984 else
5985 height += ground;
5986 }
5987 else
5988 {
5989 height += ground;
5990 }
5991
5992 m_host.SetHoverHeight((float)height, hoverType, (float)tau);
5993 }
5896 } 5994 }
5897 5995
5898 protected UUID GetTaskInventoryItem(string name) 5996 protected UUID GetTaskInventoryItem(string name)
@@ -6021,13 +6119,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6021 public void llSetVehicleFlags(int flags) 6119 public void llSetVehicleFlags(int flags)
6022 { 6120 {
6023 m_host.AddScriptLPS(1); 6121 m_host.AddScriptLPS(1);
6024 NotImplemented("llSetVehicleFlags"); 6122 if (m_host.ParentGroup != null)
6123 {
6124 if (!m_host.ParentGroup.IsDeleted)
6125 {
6126 m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false);
6127 }
6128 }
6025 } 6129 }
6026 6130
6027 public void llRemoveVehicleFlags(int flags) 6131 public void llRemoveVehicleFlags(int flags)
6028 { 6132 {
6029 m_host.AddScriptLPS(1); 6133 m_host.AddScriptLPS(1);
6030 NotImplemented("llRemoveVehicleFlags"); 6134 if (m_host.ParentGroup != null)
6135 {
6136 if (!m_host.ParentGroup.IsDeleted)
6137 {
6138 m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true);
6139 }
6140 }
6031 } 6141 }
6032 6142
6033 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) 6143 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
@@ -7049,7 +7159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7049 public void llRemoteDataSetRegion() 7159 public void llRemoteDataSetRegion()
7050 { 7160 {
7051 m_host.AddScriptLPS(1); 7161 m_host.AddScriptLPS(1);
7052 NotImplemented("llRemoteDataSetRegion"); 7162 Deprecated("llRemoteDataSetRegion");
7053 } 7163 }
7054 7164
7055 public LSL_Float llLog10(double val) 7165 public LSL_Float llLog10(double val)
@@ -8081,7 +8191,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8081 public void llSetInventoryPermMask(string item, int mask, int value) 8191 public void llSetInventoryPermMask(string item, int mask, int value)
8082 { 8192 {
8083 m_host.AddScriptLPS(1); 8193 m_host.AddScriptLPS(1);
8084 NotImplemented("llSetInventoryPermMask"); 8194 if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
8195 {
8196 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
8197 {
8198 lock (m_host.TaskInventory)
8199 {
8200 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
8201 {
8202 if (inv.Value.Name == item)
8203 {
8204 switch (mask)
8205 {
8206 case 0:
8207 inv.Value.BasePermissions = (uint)value;
8208 break;
8209 case 1:
8210 inv.Value.CurrentPermissions = (uint)value;
8211 break;
8212 case 2:
8213 inv.Value.GroupPermissions = (uint)value;
8214 break;
8215 case 3:
8216 inv.Value.EveryonePermissions = (uint)value;
8217 break;
8218 case 4:
8219 inv.Value.NextPermissions = (uint)value;
8220 break;
8221 }
8222 }
8223 }
8224 }
8225 }
8226 }
8085 } 8227 }
8086 8228
8087 public LSL_String llGetInventoryCreator(string item) 8229 public LSL_String llGetInventoryCreator(string item)
@@ -8515,6 +8657,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8515 // we send to all 8657 // we send to all
8516 landData.MediaID = new UUID(texture); 8658 landData.MediaID = new UUID(texture);
8517 landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0; 8659 landData.MediaAutoScale = autoAlign ? (byte)1 : (byte)0;
8660 landData.MediaSize[0] = width;
8661 landData.MediaSize[1] = height;
8662 landData.MediaType = mediaType;
8518 8663
8519 // do that one last, it will cause a ParcelPropertiesUpdate 8664 // do that one last, it will cause a ParcelPropertiesUpdate
8520 landObject.SetMediaUrl(url); 8665 landObject.SetMediaUrl(url);
@@ -8574,11 +8719,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8574 m_host.AddScriptLPS(1); 8719 m_host.AddScriptLPS(1);
8575 LSL_List list = new LSL_List(); 8720 LSL_List list = new LSL_List();
8576 //TO DO: make the implementation for the missing commands 8721 //TO DO: make the implementation for the missing commands
8577 //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture.
8578 //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url.
8579 //PARCEL_MEDIA_COMMAND_TYPE string mime_type Use this to get or set the parcel media MIME type (e.g. "text/html"). (1.19.1 RC0 or later)
8580 //PARCEL_MEDIA_COMMAND_SIZE integer x, integer y Use this to get or set the parcel media pixel resolution. (1.19.1 RC0 or later)
8581 //PARCEL_MEDIA_COMMAND_DESC string desc Use this to get or set the parcel media description. (1.19.1 RC0 or later)
8582 //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) 8722 //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later)
8583 for (int i = 0; i < aList.Data.Length; i++) 8723 for (int i = 0; i < aList.Data.Length; i++)
8584 { 8724 {
@@ -8596,6 +8736,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8596 case ParcelMediaCommandEnum.Texture: 8736 case ParcelMediaCommandEnum.Texture:
8597 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString())); 8737 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString()));
8598 break; 8738 break;
8739 case ParcelMediaCommandEnum.Type:
8740 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaType));
8741 break;
8742 case ParcelMediaCommandEnum.Size:
8743 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaSize[0]));
8744 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaSize[1]));
8745 break;
8599 default: 8746 default:
8600 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; 8747 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
8601 NotImplemented("llParcelMediaQuery parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString()); 8748 NotImplemented("llParcelMediaQuery parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString());
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 13b855f..7cf82b2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -160,6 +160,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
160 public const int VEHICLE_BANKING_MIX = 39; 160 public const int VEHICLE_BANKING_MIX = 39;
161 public const int VEHICLE_BANKING_TIMESCALE = 40; 161 public const int VEHICLE_BANKING_TIMESCALE = 40;
162 public const int VEHICLE_REFERENCE_FRAME = 44; 162 public const int VEHICLE_REFERENCE_FRAME = 44;
163 public const int VEHICLE_RANGE_BLOCK = 45;
164 public const int VEHICLE_ROLL_FRAME = 46;
163 public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1; 165 public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1;
164 public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2; 166 public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2;
165 public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4; 167 public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4;
@@ -170,6 +172,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
170 public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128; 172 public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128;
171 public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256; 173 public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256;
172 public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512; 174 public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512;
175 public const int VEHICLE_FLAG_NO_X = 1024;
176 public const int VEHICLE_FLAG_NO_Y = 2048;
177 public const int VEHICLE_FLAG_NO_Z = 4096;
178 public const int VEHICLE_FLAG_LOCK_HOVER_HEIGHT = 8192;
179 public const int VEHICLE_FLAG_NO_DEFLECTION = 16392;
180 public const int VEHICLE_FLAG_LOCK_ROTATION = 32784;
173 181
174 public const int INVENTORY_ALL = -1; 182 public const int INVENTORY_ALL = -1;
175 public const int INVENTORY_NONE = -1; 183 public const int INVENTORY_NONE = -1;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
index bf3d335..bcdc7bf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
@@ -389,7 +389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
389 break; 389 break;
390 case "MinEventDelay": 390 case "MinEventDelay":
391 double minEventDelay = 0.0; 391 double minEventDelay = 0.0;
392 double.TryParse(part.InnerText, out minEventDelay); 392 double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay);
393 instance.MinEventDelay = minEventDelay; 393 instance.MinEventDelay = minEventDelay;
394 break; 394 break;
395 } 395 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index faf9c40..e87b1f4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared
72 return; 72 return;
73 } 73 }
74 bool res; 74 bool res;
75 res = Double.TryParse(tmps[0], out x); 75 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x);
76 res = res & Double.TryParse(tmps[1], out y); 76 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y);
77 res = res & Double.TryParse(tmps[2], out z); 77 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z);
78 } 78 }
79 79
80 #endregion 80 #endregion
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
309 return; 309 return;
310 } 310 }
311 bool res; 311 bool res;
312 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x); 312 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x);
313 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y); 313 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y);
314 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z); 314 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z);
315 res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s); 315 res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s);
316 if (x == 0 && y == 0 && z == 0 && s == 0) 316 if (x == 0 && y == 0 && z == 0 && s == 0)
317 s = 1; 317 s = 1;
318 } 318 }
@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1015 double entry; 1015 double entry;
1016 for (int i = 0; i < Data.Length; i++) 1016 for (int i = 0; i < Data.Length; i++)
1017 { 1017 {
1018 if (double.TryParse(Data[i].ToString(), out entry)) 1018 if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
1019 { 1019 {
1020 if (entry < minimum) minimum = entry; 1020 if (entry < minimum) minimum = entry;
1021 } 1021 }
@@ -1029,7 +1029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1029 double entry; 1029 double entry;
1030 for (int i = 0; i < Data.Length; i++) 1030 for (int i = 0; i < Data.Length; i++)
1031 { 1031 {
1032 if (double.TryParse(Data[i].ToString(), out entry)) 1032 if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
1033 { 1033 {
1034 if (entry > maximum) maximum = entry; 1034 if (entry > maximum) maximum = entry;
1035 } 1035 }
@@ -1048,7 +1048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1048 double entry; 1048 double entry;
1049 for (int i = 0; i < Data.Length; i++) 1049 for (int i = 0; i < Data.Length; i++)
1050 { 1050 {
1051 if (double.TryParse(Data[i].ToString(), out entry)) 1051 if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
1052 { 1052 {
1053 count++; 1053 count++;
1054 } 1054 }
@@ -1062,7 +1062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1062 double entry; 1062 double entry;
1063 for (int i = 0; i < src.Data.Length - 1; i++) 1063 for (int i = 0; i < src.Data.Length - 1; i++)
1064 { 1064 {
1065 if (double.TryParse(src.Data[i].ToString(), out entry)) 1065 if (double.TryParse(src.Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
1066 { 1066 {
1067 ret.Add(entry); 1067 ret.Add(entry);
1068 } 1068 }
@@ -1076,7 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1076 double entry; 1076 double entry;
1077 for (int i = 0; i < Data.Length; i++) 1077 for (int i = 0; i < Data.Length; i++)
1078 { 1078 {
1079 if (double.TryParse(Data[i].ToString(), out entry)) 1079 if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
1080 { 1080 {
1081 sum = sum + entry; 1081 sum = sum + entry;
1082 } 1082 }
@@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1090 double entry; 1090 double entry;
1091 for (int i = 0; i < Data.Length; i++) 1091 for (int i = 0; i < Data.Length; i++)
1092 { 1092 {
1093 if (double.TryParse(Data[i].ToString(), out entry)) 1093 if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
1094 { 1094 {
1095 sum = sum + Math.Pow(entry, 2); 1095 sum = sum + Math.Pow(entry, 2);
1096 } 1096 }
@@ -1213,11 +1213,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
1213 { 1213 {
1214 double a; 1214 double a;
1215 double b; 1215 double b;
1216 if (!double.TryParse(x.ToString(), out a)) 1216 if (!double.TryParse(x.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out a))
1217 { 1217 {
1218 a = 0.0; 1218 a = 0.0;
1219 } 1219 }
1220 if (!double.TryParse(y.ToString(), out b)) 1220 if (!double.TryParse(y.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out b))
1221 { 1221 {
1222 b = 0.0; 1222 b = 0.0;
1223 } 1223 }
@@ -1857,7 +1857,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1857 else 1857 else
1858 if (v.EndsWith(".")) 1858 if (v.EndsWith("."))
1859 v = v + "0"; 1859 v = v + "0";
1860 this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider); 1860 this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.NumberFormatInfo);
1861 } 1861 }
1862 1862
1863 #endregion 1863 #endregion