aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world/Entity.cs
diff options
context:
space:
mode:
authorgareth2007-03-04 00:44:26 +0000
committergareth2007-03-04 00:44:26 +0000
commit572ab939369de8ccb666b31029cad119a965a57a (patch)
tree2c70798e4e33bc712fbe7bab7742944ef5215001 /src/world/Entity.cs
parentRollback to r117 (diff)
downloadopensim-SC_OLD-572ab939369de8ccb666b31029cad119a965a57a.zip
opensim-SC_OLD-572ab939369de8ccb666b31029cad119a965a57a.tar.gz
opensim-SC_OLD-572ab939369de8ccb666b31029cad119a965a57a.tar.bz2
opensim-SC_OLD-572ab939369de8ccb666b31029cad119a965a57a.tar.xz
Merged makomk's patch as per bug #61
Rescued my brain ready to implement animations and proper velocity encoding
Diffstat (limited to 'src/world/Entity.cs')
-rw-r--r--src/world/Entity.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/world/Entity.cs b/src/world/Entity.cs
index 92ab2da..7880a46 100644
--- a/src/world/Entity.cs
+++ b/src/world/Entity.cs
@@ -2,15 +2,18 @@ using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using Axiom.MathLib; 4using Axiom.MathLib;
5using libsecondlife;
5using OpenSim.types; 6using OpenSim.types;
7using libsecondlife.Packets;
6 8
7namespace OpenSim.world 9namespace OpenSim.world
8{ 10{
9 public class Entity 11 public class Entity
10 { 12 {
11 protected libsecondlife.LLUUID uuid; 13 protected libsecondlife.LLUUID uuid;
12 protected Vector3 position; 14 protected uint localid;
13 protected Vector3 velocity; 15 public LLVector3 position;
16 public LLVector3 velocity;
14 protected Quaternion rotation; 17 protected Quaternion rotation;
15 protected string name; 18 protected string name;
16 protected List<Entity> children; 19 protected List<Entity> children;
@@ -19,8 +22,9 @@ namespace OpenSim.world
19 public Entity() 22 public Entity()
20 { 23 {
21 uuid = new libsecondlife.LLUUID(); 24 uuid = new libsecondlife.LLUUID();
22 position = new Vector3(); 25 localid = 8880000 + (OpenSim_Main.local_world._localNumber++); // FIXME - race condition!
23 velocity = new Vector3(); 26 position = new LLVector3();
27 velocity = new LLVector3();
24 rotation = new Quaternion(); 28 rotation = new Quaternion();
25 name = "(basic entity)"; 29 name = "(basic entity)";
26 children = new List<Entity>(); 30 children = new List<Entity>();
@@ -33,8 +37,14 @@ namespace OpenSim.world
33 if(child.needupdate) 37 if(child.needupdate)
34 child.update(); 38 child.update();
35 } 39 }
40 this.needupdate=false;
36 } 41 }
37 42
43 public virtual ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateTerseBlock() {
44 return null;
45 }
46
47
38 public virtual string getName() 48 public virtual string getName()
39 { 49 {
40 return name; 50 return name;