In LSL_Api.cs, no special checking of if ScriptEngineToSceneConnectorModule exist anymore --

async model is no longer used and we get rid of the old code.
dsg
Huaiyu (Kitty) Liu 2011-03-09 17:16:03 -08:00
parent e4bdaaaa83
commit b848df2a3a
4 changed files with 44 additions and 91 deletions

View File

@ -1200,7 +1200,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
primCount += sog.Parts.Length;
}
m_log.WarnFormat("SyncStatus -- Object count: {0}, Prim Count {1} ", sogList.Count, primCount);
m_log.WarnFormat("SyncStateReport -- Object count: {0}, Prim Count {1} ", sogList.Count, primCount);
}
private void SyncDebug(Object[] args)

View File

@ -333,11 +333,13 @@ namespace OpenSim.Region.Framework.Scenes
ArrayList errors = new ArrayList();
//In the old async model, this function is supposed to be executed only on a remote script engine, not an authorative Scene
/*
if (RegionSyncModule==null && !IsSyncedScriptEngine())
{
m_log.Warn("This is not the script engine. Should not have received OnUpdateScript event.");
return errors;
}
* */
SceneObjectPart part = GetSceneObjectPart(primID);
SceneObjectGroup group = part.ParentGroup;
if (isScriptRunning)

View File

@ -509,6 +509,7 @@ namespace OpenSim.Region.Framework.Scenes
return IsSyncedServer();
}
///////////////////////////////////////////////////////////////////////////////////////////////
//RA: Physics Engine
///////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1353,7 +1353,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SetScale(m_host, scale);
}
//REGION SYNC TOUCHED -- set via sync'ing with remote Scene
protected void SetScale(SceneObjectPart part, LSL_Vector scale)
{
// TODO: this needs to trigger a persistance save as well
@ -1383,9 +1382,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (scale.z > World.m_maxNonphys)
scale.z = World.m_maxNonphys;
if (World.ScriptEngineToSceneConnectorModule==null)
{
//If Script engine is local to Scene (REGION SYNC mode=server, and XEngine enabled=true, and no remote Script Engine connected)
Vector3 tmp = part.Scale;
tmp.X = (float)scale.x;
tmp.Y = (float)scale.y;
@ -1393,12 +1389,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.Scale = tmp;
part.SendFullUpdateToAllClients();
}
else
{
//set via sync'ing with remote Scene
World.ScriptEngineToSceneConnectorModule.SendSetPrimProperties(part.ParentGroup.LocX, part.ParentGroup.LocY, part.UUID, "scale", scale);
}
}
public LSL_Vector llGetScale()
{
@ -1416,7 +1406,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
}
//REGION SYNC TOUCHED -- set via sync'ing with remote Scene
public void llSetColor(LSL_Vector color, int face)
{
m_host.AddScriptLPS(1);
@ -1424,23 +1413,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (face == ScriptBaseClass.ALL_SIDES)
face = SceneObjectPart.ALL_SIDES;
// REGION SYNC
if (World.ScriptEngineToSceneConnectorModule == null)
{
m_host.SetFaceColor(new Vector3((float)color.x, (float)color.y, (float)color.z), face);
}
else
{
object[] valParams = new object[2];
//valParams[0] = (object)color.x;
//valParams[1] = (object)color.y;
//valParams[2] = (object)color.z;
Vector3 vcolor = new Vector3((float)color.x, (float)color.y, (float)color.z);
valParams[0] = (object)vcolor;
valParams[1] = (object)face;
World.ScriptEngineToSceneConnectorModule.SendSetPrimProperties(m_host.ParentGroup.LocX, m_host.ParentGroup.LocY, m_host.UUID, "color", (object)valParams);
}
}
public void SetTexGen(SceneObjectPart part, int face,int style)
{
@ -2766,7 +2740,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(100);
}
//REGION SYNC TOUCHED -- set via sync'ing with remote Scene
public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
{
m_host.AddScriptLPS(1);
@ -2778,10 +2751,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (dist > m_ScriptDistanceFactor * 10.0f)
return;
if (World.ScriptEngineToSceneConnectorModule == null)
{
//if Scene co-locates with Script Engine
TaskInventoryDictionary partInventory = (TaskInventoryDictionary)m_host.TaskInventory.Clone();
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in partInventory)
@ -2836,26 +2805,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
llSay(0, "Could not find object " + inventory);
}
else
{
//Scene does not co-locate with Script Engine
Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
Vector3 llvel = new Vector3((float)vel.x, (float)vel.y, (float)vel.z);
Quaternion llrot = Rot2Quaternion(rot);
object[] valParams = new object[5];
valParams[0] = (object)inventory;
valParams[1] = (object)llpos;
valParams[2] = (object)llpos;
valParams[3] = (object)llrot;
valParams[4] = (object)param;
//we borrow the implementation SendSetPrimProperties to send the message to Scene
World.ScriptEngineToSceneConnectorModule.SendSetPrimProperties(m_host.ParentGroup.LocX, m_host.ParentGroup.LocY, m_host.UUID, "object_rez", (object)valParams);
// Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
//ScriptSleep((int)((groupmass * velmag) / 10));
ScriptSleep(100);
}
}
public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
{