aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-11-08 21:25:26 +0000
committerCharles Krinke2008-11-08 21:25:26 +0000
commitedb2344796d04146dd78ec94ed5db1a9d84c2b26 (patch)
treec171d4bf9ef723b81254b96803f1e4e8d67a9389 /OpenSim
parentMantis#2589: Thanks StrawberryFride, for a patch that fixes the build on VS2005. (diff)
downloadopensim-SC_OLD-edb2344796d04146dd78ec94ed5db1a9d84c2b26.zip
opensim-SC_OLD-edb2344796d04146dd78ec94ed5db1a9d84c2b26.tar.gz
opensim-SC_OLD-edb2344796d04146dd78ec94ed5db1a9d84c2b26.tar.bz2
opensim-SC_OLD-edb2344796d04146dd78ec94ed5db1a9d84c2b26.tar.xz
Mantis#2583. Thank you kindly, Idb for a patch that solves:
PRIM_TEMP_ON_REZ and PRIM_MATERIAL are not implemented in llSetPrimitiveParams so support for these is in the patch. Also two deprecated functions throw errors. They are changed to behave as in SL: llSetPrimURL - Does nothing except the sleep (currently commented out) & llRefreshPrimURL shouts "llRefreshPrimURL - not yet supported" on the error channel
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs47
1 files changed, 31 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 08f8c01..e905da6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6045,6 +6045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6045 6045
6046 public void llSetPrimitiveParams(LSL_List rules) 6046 public void llSetPrimitiveParams(LSL_List rules)
6047 { 6047 {
6048 m_host.AddScriptLPS(1);
6048 SetPrimParams(m_host, rules); 6049 SetPrimParams(m_host, rules);
6049 } 6050 }
6050 6051
@@ -6329,16 +6330,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6329 case (int)ScriptBaseClass.PRIM_MATERIAL: 6330 case (int)ScriptBaseClass.PRIM_MATERIAL:
6330 if (remain < 1) 6331 if (remain < 1)
6331 return; 6332 return;
6332 if (part != null) 6333 int mat = rules.GetLSLIntegerItem(idx++);
6333 { 6334 if (mat < 0 || mat > 7)
6334 /* Unhandled at this time - sends "Unhandled" message 6335 return;
6335 will enable when available 6336
6336 byte material = Convert.ToByte((int)rules.GetLSLIntegerItem(idx++)); 6337 part.Material = Convert.ToByte(mat);
6337 part.Material = material; 6338 break;
6338 */
6339 return;
6340 }
6341 break;
6342 case (int)ScriptBaseClass.PRIM_PHANTOM: 6339 case (int)ScriptBaseClass.PRIM_PHANTOM:
6343 if (remain < 1) 6340 if (remain < 1)
6344 return; 6341 return;
@@ -6352,8 +6349,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6352 phantom = false; 6349 phantom = false;
6353 6350
6354 part.ScriptSetPhantomStatus(phantom); 6351 part.ScriptSetPhantomStatus(phantom);
6355 part.ScheduleFullUpdate(); 6352 break;
6356 break;
6357 case (int)ScriptBaseClass.PRIM_PHYSICS: 6353 case (int)ScriptBaseClass.PRIM_PHYSICS:
6358 if (remain < 1) 6354 if (remain < 1)
6359 return; 6355 return;
@@ -6365,8 +6361,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6365 else 6361 else
6366 physics = false; 6362 physics = false;
6367 6363
6368 m_host.ScriptSetPhysicsStatus(physics); 6364 part.ScriptSetPhysicsStatus(physics);
6369 part.ScheduleFullUpdate(); 6365 break;
6366 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
6367 if (remain < 1)
6368 return;
6369 string temp = rules.Data[idx++].ToString();
6370 bool tempOnRez;
6371
6372 if (temp.Equals("1"))
6373 tempOnRez = true;
6374 else
6375 tempOnRez = false;
6376
6377 part.ScriptSetTemporaryStatus(tempOnRez);
6370 break; 6378 break;
6371 } 6379 }
6372 } 6380 }
@@ -7999,17 +8007,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7999 return new LSL_Rotation(); 8007 return new LSL_Rotation();
8000 } 8008 }
8001 8009
8010 /// <summary>
8011 /// The SL implementation does nothing, it is deprecated
8012 /// This duplicates SL
8013 /// </summary>
8002 public void llSetPrimURL(string url) 8014 public void llSetPrimURL(string url)
8003 { 8015 {
8004 m_host.AddScriptLPS(1); 8016 m_host.AddScriptLPS(1);
8005 NotImplemented("llSetPrimURL");
8006 // ScriptSleep(2000); 8017 // ScriptSleep(2000);
8007 } 8018 }
8008 8019
8020 /// <summary>
8021 /// The SL implementation shouts an error, it is deprecated
8022 /// This duplicates SL
8023 /// </summary>
8009 public void llRefreshPrimURL() 8024 public void llRefreshPrimURL()
8010 { 8025 {
8011 m_host.AddScriptLPS(1); 8026 m_host.AddScriptLPS(1);
8012 NotImplemented("llRefreshPrimURL"); 8027 ShoutError("llRefreshPrimURL - not yet supported");
8013 // ScriptSleep(20000); 8028 // ScriptSleep(20000);
8014 } 8029 }
8015 8030