From b898914715da7559c6b32f911c5eea3150a0dfef Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 10 Jun 2007 12:31:16 +0000 Subject: part two of the folder renaming fix. --- .../scripting/Scripts/FollowRandomAvatar.cs | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 OpenSim/OpenSim.Reg/scripting/Scripts/FollowRandomAvatar.cs (limited to 'OpenSim/OpenSim.Reg/scripting/Scripts') diff --git a/OpenSim/OpenSim.Reg/scripting/Scripts/FollowRandomAvatar.cs b/OpenSim/OpenSim.Reg/scripting/Scripts/FollowRandomAvatar.cs deleted file mode 100644 index 9c0146b..0000000 --- a/OpenSim/OpenSim.Reg/scripting/Scripts/FollowRandomAvatar.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using libsecondlife; - -namespace OpenSim.Region.Scripting -{ - public class FollowRandomAvatar : Script - { - public FollowRandomAvatar() - : base(LLUUID.Random()) - { - OnFrame += MyOnFrame; - } - - private void MyOnFrame(IScriptContext context) - { - LLVector3 pos = context.Entity.Pos; - - IScriptReadonlyEntity avatar; - - if (context.TryGetRandomAvatar(out avatar)) - { - LLVector3 avatarPos = avatar.Pos; - - float x = pos.X + ((float)avatarPos.X.CompareTo(pos.X)) / 2; - float y = pos.Y + ((float)avatarPos.Y.CompareTo(pos.Y)) / 2; - - LLVector3 newPos = new LLVector3(x, y, pos.Z); - - context.Entity.Pos = newPos; - } - } - } - - -} -- cgit v1.1