aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.World/Avatar.cs
diff options
context:
space:
mode:
authorMW2007-05-26 14:55:17 +0000
committerMW2007-05-26 14:55:17 +0000
commit06387d0344b8fa84b790a9dd910fda8a0a1128bb (patch)
treefaf19abd4c940e6c6fddf805beaee47b9b175e32 /OpenSim/OpenSim.World/Avatar.cs
parentDie WebFrontEnd, Die Grid class! (diff)
downloadopensim-SC_OLD-06387d0344b8fa84b790a9dd910fda8a0a1128bb.zip
opensim-SC_OLD-06387d0344b8fa84b790a9dd910fda8a0a1128bb.tar.gz
opensim-SC_OLD-06387d0344b8fa84b790a9dd910fda8a0a1128bb.tar.bz2
opensim-SC_OLD-06387d0344b8fa84b790a9dd910fda8a0a1128bb.tar.xz
Goodbye World
Diffstat (limited to 'OpenSim/OpenSim.World/Avatar.cs')
-rw-r--r--OpenSim/OpenSim.World/Avatar.cs157
1 files changed, 157 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.World/Avatar.cs b/OpenSim/OpenSim.World/Avatar.cs
new file mode 100644
index 0000000..cca266b
--- /dev/null
+++ b/OpenSim/OpenSim.World/Avatar.cs
@@ -0,0 +1,157 @@
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Text;
5using libsecondlife;
6using libsecondlife.Packets;
7using OpenSim.Physics.Manager;
8using OpenSim.Framework.Inventory;
9using OpenSim.Framework.Interfaces;
10using Axiom.MathLib;
11
12namespace OpenSim.world
13{
14 public partial class Avatar : Entity
15 {
16 public static bool PhysicsEngineFlying = false;
17 public static AvatarAnimations Animations;
18 public string firstname;
19 public string lastname;
20 public ClientView ControllingClient;
21 public LLUUID current_anim;
22 public int anim_seq;
23 private static libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate;
24 private bool updateflag = false;
25 private byte movementflag = 0;
26 private List<NewForce> forcesList = new List<NewForce>();
27 private short _updateCount = 0;
28 private Axiom.MathLib.Quaternion bodyRot;
29 private LLObject.TextureEntry avatarAppearanceTexture = null;
30 private byte[] visualParams;
31 private AvatarWearable[] Wearables;
32 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
33 private ulong m_regionHandle;
34 //private Dictionary<uint, ClientView> m_clientThreads;
35 private string m_regionName;
36 private ushort m_regionWaterHeight;
37 private bool m_regionTerraform;
38 private bool childAvatar = false;
39
40 public Avatar(ClientView TheClient, World world, string regionName, Dictionary<uint, ClientView> clientThreads, ulong regionHandle, bool regionTerraform, ushort regionWater)
41 {
42 m_world = world;
43 // m_clientThreads = clientThreads;
44 m_regionName = regionName;
45 m_regionHandle = regionHandle;
46 m_regionTerraform = regionTerraform;
47 m_regionWaterHeight = regionWater;
48
49 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs - Loading details from grid (DUMMY)");
50 ControllingClient = TheClient;
51 localid = 8880000 + (this.m_world._localNumber++);
52 Pos = ControllingClient.startpos;
53 visualParams = new byte[218];
54 for (int i = 0; i < 218; i++)
55 {
56 visualParams[i] = 100;
57 }
58 Wearables = new AvatarWearable[13]; //should be 13 of these
59 for (int i = 0; i < 13; i++)
60 {
61 Wearables[i] = new AvatarWearable();
62 }
63 this.Wearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
64 this.Wearables[0].ItemID = LLUUID.Random();
65
66 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
67
68 //register for events
69 ControllingClient.OnRequestWearables += new ClientView.GenericCall(this.SendOurAppearance);
70 ControllingClient.OnSetAppearance += new SetAppearance(this.SetAppearance);
71 ControllingClient.OnCompleteMovementToRegion += new ClientView.GenericCall2(this.CompleteMovement);
72 ControllingClient.OnCompleteMovementToRegion += new ClientView.GenericCall2(this.SendInitialPosition);
73 ControllingClient.OnAgentUpdate += new ClientView.GenericCall3(this.HandleAgentUpdate);
74 ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
75 ControllingClient.OnChildAgentStatus += new ClientView.StatusChange(this.ChildStatusChange);
76 ControllingClient.OnStopMovement += new ClientView.GenericCall2(this.StopMovement);
77 }
78
79 public PhysicsActor PhysActor
80 {
81 set
82 {
83 this._physActor = value;
84 }
85 get
86 {
87 return _physActor;
88 }
89 }
90
91 public void ChildStatusChange(bool status)
92 {
93
94 }
95
96 public override void addForces()
97 {
98
99 }
100
101 public static void SetupTemplate(string name)
102 {
103
104 }
105
106 protected static void SetDefaultPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
107 {
108
109
110
111 }
112
113 public void CompleteMovement()
114 {
115
116 }
117
118 public void HandleAgentUpdate(Packet pack)
119 {
120 this.HandleUpdate((AgentUpdatePacket)pack);
121 }
122
123 public void HandleUpdate(AgentUpdatePacket pack)
124 {
125
126 }
127
128 //really really should be moved somewhere else (RegionInfo.cs ?)
129 public void SendRegionHandshake(World regionInfo)
130 {
131
132 }
133
134 public static void LoadAnims()
135 {
136
137 }
138
139 public override void LandRenegerated()
140 {
141
142 }
143 }
144
145 public class NewForce
146 {
147 public float X;
148 public float Y;
149 public float Z;
150
151 public NewForce()
152 {
153
154 }
155 }
156
157}