Пример #1
0
 /// <summary>
 /// Creates a classes that are used in VMF
 /// </summary>
 /// <remarks>
 /// TODO: dispinfo sub classes are missing
 /// </remarks>
 public VMF()
 {
     versioninfo  = new versioninfo();
     visgroups    = new visgroups();
     viewsettings = new viewsettings();
     world        = new world();
     cameras      = new cameras();
     cordons      = new cordons();
 }
Пример #2
0
        public static VMF SetupBasicVFM(VMF vfm)
        {
            //versioninfo
            versioninfo vi = new versioninfo();

            vi.editorbuild   = 400;
            vi.editorbuild   = 6262;
            vi.mapversion    = 7;
            vi.formatversion = 100;
            vi.prefab        = false;
            vfm.versioninfo  = vi;

            //viewsettings
            viewsettings vs = new viewsettings();

            vs.bSnapToGrid      = true;
            vs.bShowGrid        = true;
            vs.bShowLogicalGrid = false;
            vs.nGridSpacing     = 16;
            vs.bShow3DGrid      = false;
            vfm.viewsettings    = vs;

            //world
            world w = new world();

            w.id         = 1;
            w.mapversion = "1";
            w.classname  = "worldspawn";
            w.skyname    = "sky_wasteland02"; //Maybe this should be a pass-in?
            w.solid      = new List <solid>();
            vfm.world    = w;

            //cameras
            cameras c = new cameras();

            c.activecamera = false;
            c.camera       = new List <camera>();
            c.camera.Add(new camera());
            vfm.cameras = c;

            //cordons
            cordons cd = new cordons();

            cd.active   = false;
            vfm.cordons = cd;

            return(vfm);
        }