Ejemplo n.º 1
0
        public void attach_portal(REFR other_end)
        {
            Portal_Data portal_positioning = new Portal_Data(other_end.loc.x, other_end.loc.y, other_end.loc.z, other_end.loc.xR, other_end.loc.yR, other_end.loc.zR, other_end.id);
            Field       XTEL = new Field("XTEL", portal_positioning.toBin());

            addField(XTEL);
        }
Ejemplo n.º 2
0
        public void addWater(float height)
        {
            HasWater = true;

            float padding = 1024;

            max_x = max_x + padding;
            min_x = min_x - padding;

            max_y += padding;
            min_y -= padding;

            float size_x = Math.Abs(max_x - min_x);
            float size_y = Math.Abs(max_y - min_y);
            float size   = Math.Max(size_x, size_y);


            if (size / 2048f <= 10.0f)
            {
                REFR water_mesh = new REFR(ACTI.get_water_instance().id, (max_x + min_x) / 2f, (max_y + min_y) / 2f, height, 0, 0, 0, size / 2048f);
                persistent_references.addRecord(water_mesh);
                water_mesh.make_persistent();
            }

            else
            {
                for (float x = min_x; x <= max_x; x = x + 20480)
                {
                    for (float y = min_y; y <= max_y; y = y + 20480)
                    {
                        Log.confirm("TES5.CELL addwater() FULL-SIZE: This functionality is untested. Are you sure you want to continue?");
                        REFR water_mesh = new REFR(ACTI.get_water_instance().id, x, y, height, 0, 0, 0, 10);
                        persistent_references.addRecord(water_mesh);
                    }
                }
            }
        }