aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMW2007-07-14 13:18:02 +0000
committerMW2007-07-14 13:18:02 +0000
commita04602d9c136b882a6c72d4c3c09c3ca0d526c37 (patch)
tree5ff7df736ea67a6ab7830fa0d41a85610d900bbb /OpenSim/Region/Environment
parent*Moved the OnSignificantClientMovement event to ScenePresence. (diff)
downloadopensim-SC-a04602d9c136b882a6c72d4c3c09c3ca0d526c37.zip
opensim-SC-a04602d9c136b882a6c72d4c3c09c3ca0d526c37.tar.gz
opensim-SC-a04602d9c136b882a6c72d4c3c09c3ca0d526c37.tar.bz2
opensim-SC-a04602d9c136b882a6c72d4c3c09c3ca0d526c37.tar.xz
Added AddPreCompiledScript method to ScriptManager.
Done some work on lbsa71's simpleApp(hope he doesn't mind): now have the avatar showing up and the terrain and his pulsating box (well except its not a box, as there seems to be something wrong with our PrimitiveBaseShape..DefaultBox() settings). Also noticed a few other problems that I had to work around, so these need looking into.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs8
4 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index f9b3145..bf98b0d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -146,6 +146,7 @@ namespace OpenSim.Region.Environment.Scenes
146 avatar = this.Avatars[fromAgentID]; 146 avatar = this.Avatars[fromAgentID];
147 fromPos = avatar.Pos; 147 fromPos = avatar.Pos;
148 fromName = avatar.firstname + " " + avatar.lastname; 148 fromName = avatar.firstname + " " + avatar.lastname;
149 avatar = null;
149 } 150 }
150 151
151 m_clientManager.ForEachClient(delegate(IClientAPI client) 152 m_clientManager.ForEachClient(delegate(IClientAPI client)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 318b025..737e8fe 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -487,7 +487,7 @@ namespace OpenSim.Region.Environment.Scenes
487 487
488 } 488 }
489 489
490 protected void CreateAndAddScenePresence(IClientAPI client) 490 protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
491 { 491 {
492 ScenePresence newAvatar = null; 492 ScenePresence newAvatar = null;
493 493
@@ -524,6 +524,8 @@ namespace OpenSim.Region.Environment.Scenes
524 this.Avatars.Add(client.AgentId, newAvatar); 524 this.Avatars.Add(client.AgentId, newAvatar);
525 } 525 }
526 } 526 }
527 newAvatar.OnSignificantClientMovement += parcelManager.handleSignificantClientMovement;
528 return newAvatar;
527 } 529 }
528 530
529 531
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 8559caf..6966989 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -40,9 +40,6 @@ namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public partial class ScenePresence : Entity 41 public partial class ScenePresence : Entity
42 { 42 {
43
44
45
46 public static bool PhysicsEngineFlying = false; 43 public static bool PhysicsEngineFlying = false;
47 public static AvatarAnimations Animations; 44 public static AvatarAnimations Animations;
48 public static byte[] DefaultTexture; 45 public static byte[] DefaultTexture;
@@ -151,7 +148,7 @@ namespace OpenSim.Region.Environment.Scenes
151 // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); 148 // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
152 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 149 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
153 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 150 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
154 OnSignificantClientMovement += new SignificantClientMovement(m_world.parcelManager.handleSignificantClientMovement); 151
155 Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD 152 Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD
156 Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK 153 Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK
157 Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT 154 Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
index 736d18b..7a08735 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
@@ -89,6 +89,14 @@ namespace OpenSim.Region.Scripting
89 break; 89 break;
90 } 90 }
91 } 91 }
92
93 public void AddPreCompiledScript(IScript script)
94 {
95 MainLog.Instance.Verbose("Loading script " + script.getName());
96 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
97 script.Initialise(scriptInfo);
98 scripts.Add(script);
99 }
92 } 100 }
93 101
94 interface IScriptCompiler 102 interface IScriptCompiler