Exemplo n.º 1
0
        public VMSolidResult SolidToAvatars(LotTilePos pos)
        {
            if (IsOutOfBounds(pos) || (pos.Level < 1) ||
                (pos.Level != 1 && Architecture.GetFloor(pos.TileX, pos.TileY, pos.Level).Pattern == 0))
            {
                return new VMSolidResult {
                           Solid = true
                }
            }
            ;
            var objs = SetToNextCache.GetObjectsAt(pos);

            if (objs == null)
            {
                return(new VMSolidResult());
            }
            foreach (var obj in objs)
            {
                if (obj == null)
                {
                    continue;
                }
                var flags = (VMEntityFlags)obj.GetValue(VMStackObjectVariable.Flags);
                if (((flags & VMEntityFlags.DisallowPersonIntersection) > 0) || (flags & (VMEntityFlags.AllowPersonIntersection | VMEntityFlags.HasZeroExtent)) == 0)
                {
                    return new VMSolidResult {
                               Solid = true,
                               Chair = (obj.EntryPoints[26].ActionFunction != 0)?obj:null
                    }
                }
                ;      //solid to people
            }
            return(new VMSolidResult());
        }