Esempio n. 1
0
        public void RegisterObjectPos(VMEntity obj)
        {
            var pos = obj.Position;

            if (pos.Level < 1)
            {
                return;
            }

            //add object to room

            var room = GetObjectRoom(obj);

            VM.AddToObjList(RoomInfo[room].Entities, obj);
            if (obj.EntryPoints[15].ActionFunction != 0)
            { //portal
                AddRoomPortal(obj, room);
            }
            obj.SetRoom(room);
            if (obj.GetValue(VMStackObjectVariable.LightingContribution) > 0)
            {
                RefreshLighting(room, true);
            }

            SetToNextCache.RegisterObjectPos(obj);
        }
Esempio n. 2
0
        public override void PositionChange(VMContext context, bool noEntryPoint)
        {
            if (GhostImage)
            {
                return;
            }

            var room = context.GetObjectRoom(this);

            SetRoom(room);

            if (HandObject != null)
            {
                HandObject.Position = Position;
                HandObject.SetRoom(room);
            }

            if (Container != null)
            {
                return;
            }
            if (Position == LotTilePos.OUT_OF_WORLD)
            {
                return;
            }

            context.RegisterObjectPos(this);

            base.PositionChange(context, noEntryPoint);
        }
Esempio n. 3
0
        public void RegisterObjectPos(VMEntity obj)
        {
            var pos = obj.Position;

            if (pos.Level < 1)
            {
                return;
            }

            //add object to room

            var room = GetObjectRoom(obj);

            VM.AddToObjList(RoomInfo[room].Entities, obj);
            if (obj.EntryPoints[15].ActionFunction != 0)
            { //portal
                AddRoomPortal(obj, room);
            }
            obj.SetRoom(room);
            if (obj.GetValue(VMStackObjectVariable.LightingContribution) > 0)
            {
                RefreshLighting(room, true);
            }

            while (pos.Level > ObjectsAt.Count)
            {
                ObjectsAt.Add(new Dictionary <int, List <short> >());
            }
            if (!ObjectsAt[pos.Level - 1].ContainsKey(pos.TileID))
            {
                ObjectsAt[pos.Level - 1][pos.TileID] = new List <short>();
            }
            ObjectsAt[pos.Level - 1][pos.TileID].Add(obj.ObjectID);
        }
Esempio n. 4
0
        public void RegisterObjectPos(VMEntity obj)
        {
            var pos = obj.Position;
            if (pos.Level < 1) return;

            //add object to room

            var room = GetObjectRoom(obj);
            VM.AddToObjList(RoomInfo[room].Entities, obj);
            if (obj.EntryPoints[15].ActionFunction != 0)
            { //portal
                AddRoomPortal(obj, room);
            }
            obj.SetRoom(room);
            if (obj.GetValue(VMStackObjectVariable.LightingContribution) > 0)
                RefreshLighting(room, true);

            SetToNextCache.RegisterObjectPos(obj);
        }