Esempio n. 1
0
        private void SetWallUse(VMArchitecture arch, bool set)
        {
            var wall = arch.GetWall(Position.TileX, Position.TileY, Position.Level);

            var placeFlags = (WallPlacementFlags)ObjectData[(int)VMStackObjectVariable.WallPlacementFlags];
            int rotate = (8-(DirectionToWallOff(Direction) + 1)) % 4;
            byte rotPart = (byte)RotateWallSegs((WallSegments)((int)placeFlags%15), rotate);

            if (set) wall.OccupiedWalls |= (WallSegments)rotPart;
            else wall.OccupiedWalls &= (WallSegments)~rotPart;

            arch.SetWall(Position.TileX, Position.TileY, Position.Level, wall);
        }
Esempio n. 2
0
 private void WallsChanged(VMArchitecture caller)
 {
     RegeneratePortalInfo();
 }
Esempio n. 3
0
 private void SetWallStyle(int side, VMArchitecture arch, ushort value)
 {
     //0=top right, 1=bottom right, 2=bottom left, 3 = top left
     WallTile targ;
     switch (side)
     {
         case 0:
             targ = arch.GetWall(Position.TileX, Position.TileY, Position.Level);
             targ.ObjSetTRStyle = value;
             if (((VMEntityFlags2)ObjectData[(int)VMStackObjectVariable.FlagField2] & VMEntityFlags2.ArchitectualDoor) > 0) targ.TopRightDoor = value != 0;
             arch.SetWall(Position.TileX, Position.TileY, Position.Level, targ);
             break;
         case 1:
             //this seems to be the rule... only set if wall is top left/right. Fixes multitile windows (like really long ones)
             return;
         case 2:
             return;
         case 3:
             targ = arch.GetWall(Position.TileX, Position.TileY, Position.Level);
             targ.ObjSetTLStyle = value;
             if (((VMEntityFlags2)ObjectData[(int)VMStackObjectVariable.FlagField2] & VMEntityFlags2.ArchitectualDoor) > 0) targ.TopLeftDoor = value != 0;
             arch.SetWall(Position.TileX, Position.TileY, Position.Level, targ);
             break;
     }
 }