
pointers = {};

function pointers.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Steerable, specializations);
end;

function pointers:load(savegame)

      self.thenlight = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.thenlight#index"));
      self.thenlightActive = false;

-- door

local rotationPartNoderightdoor = Utils.indexToObject(self.rootNode, getXMLString(self.xmlFile, "vehicle.rightdoor#index"));
    if rotationPartNoderightdoor ~= nil then
        self.rotationPartrightdoor = {};
        self.rotationPartrightdoor.node = rotationPartNoderightdoor;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rightdoor#minRot"));
        self.rotationPartrightdoor.minRot = {};
        self.rotationPartrightdoor.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartrightdoor.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartrightdoor.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rightdoor#maxRot"));
        self.rotationPartrightdoor.maxRot = {};
        self.rotationPartrightdoor.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartrightdoor.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartrightdoor.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartrightdoor.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rightdoor#rotTime"), 2)*1000;
        self.rotationPartrightdoor.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rightdoor#touchRotLimit"), 10));
    end;
    local rotationPartNodeleftDoor = Utils.indexToObject(self.rootNode, getXMLString(self.xmlFile, "vehicle.leftDoor#index"));
    if rotationPartNodeleftDoor ~= nil then
        self.rotationPartleftDoor = {};
        self.rotationPartleftDoor.node = rotationPartNodeleftDoor;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.leftDoor#minRot"));
        self.rotationPartleftDoor.minRot = {};
        self.rotationPartleftDoor.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartleftDoor.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartleftDoor.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.leftDoor#maxRot"));
        self.rotationPartleftDoor.maxRot = {};
        self.rotationPartleftDoor.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartleftDoor.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartleftDoor.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartleftDoor.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.leftDoor#rotTime"), 2)*1000;
        self.rotationPartleftDoor.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.leftDoor#touchRotLimit"), 10));
    end;
    local rotationPartNodeleftRuchka = Utils.indexToObject(self.rootNode, getXMLString(self.xmlFile, "vehicle.leftRuchka#index"));
    if rotationPartNodeleftRuchka ~= nil then
        self.rotationPartleftRuchka = {};
        self.rotationPartleftRuchka.node = rotationPartNodeleftRuchka;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.leftRuchka#minRot"));
        self.rotationPartleftRuchka.minRot = {};
        self.rotationPartleftRuchka.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartleftRuchka.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartleftRuchka.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.leftRuchka#maxRot"));
        self.rotationPartleftRuchka.maxRot = {};
        self.rotationPartleftRuchka.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartleftRuchka.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartleftRuchka.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartleftRuchka.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.leftRuchka#rotTime"), 2)*1000;
        self.rotationPartleftRuchka.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.leftRuchka#touchRotLimit"), 10));
    end;
    local rotationPartNoderightRuchka = Utils.indexToObject(self.rootNode, getXMLString(self.xmlFile, "vehicle.rightRuchka#index"));
    if rotationPartNoderightRuchka ~= nil then
        self.rotationPartrightRuchka = {};
        self.rotationPartrightRuchka.node = rotationPartNoderightRuchka;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rightRuchka#minRot"));
        self.rotationPartrightRuchka.minRot = {};
        self.rotationPartrightRuchka.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartrightRuchka.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartrightRuchka.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rightRuchka#maxRot"));
        self.rotationPartrightRuchka.maxRot = {};
        self.rotationPartrightRuchka.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartrightRuchka.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartrightRuchka.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartrightRuchka.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rightRuchka#rotTime"), 2)*1000;
        self.rotationPartrightRuchka.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rightRuchka#touchRotLimit"), 10));
    end;
    local rotationPartNodekozyrek = Utils.indexToObject(self.rootNode, getXMLString(self.xmlFile, "vehicle.kozyrek#index"));
    if rotationPartNodekozyrek ~= nil then
        self.rotationPartkozyrek = {};
        self.rotationPartkozyrek.node = rotationPartNodekozyrek;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.kozyrek#minRot"));
        self.rotationPartkozyrek.minRot = {};
        self.rotationPartkozyrek.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartkozyrek.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartkozyrek.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.kozyrek#maxRot"));
        self.rotationPartkozyrek.maxRot = {};
        self.rotationPartkozyrek.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartkozyrek.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartkozyrek.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartkozyrek.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.kozyrek#rotTime"), 2)*1000;
        self.rotationPartkozyrek.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.kozyrek#touchRotLimit"), 10));
    end;
    local translationPartNode = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.translationPart#index"));
    if translationPartNode ~= nil then
        self.translationPart = {};
        self.translationPart.node = translationPartNode;
        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.translationPart#minTrans"));
        self.translationPart.minTrans = {};
        self.translationPart.minTrans[1] = Utils.getNoNil(x, 0);
        self.translationPart.minTrans[2] = Utils.getNoNil(y, 0);
        self.translationPart.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.translationPart#maxTrans"));
        self.translationPart.maxTrans = {};
        self.translationPart.maxTrans[1] = Utils.getNoNil(x, 0);
        self.translationPart.maxTrans[2] = Utils.getNoNil(y, 0);
        self.translationPart.maxTrans[3] = Utils.getNoNil(z, 0);

        self.translationPart.transTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.translationPart#transTime"), 2)*1000;
        self.translationPart.touchTransLimit = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.translationPart#touchTransLimit"), 10);
    end;
    local translationPartNode2 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.translationPart2#index"));
    if translationPartNode2 ~= nil then
        self.translationPart2 = {};
        self.translationPart2.node = translationPartNode2;
        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.translationPart2#minTrans"));
        self.translationPart2.minTrans = {};
        self.translationPart2.minTrans[1] = Utils.getNoNil(x, 0);
        self.translationPart2.minTrans[2] = Utils.getNoNil(y, 0);
        self.translationPart2.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.translationPart2#maxTrans"));
        self.translationPart2.maxTrans = {};
        self.translationPart2.maxTrans[1] = Utils.getNoNil(x, 0);
        self.translationPart2.maxTrans[2] = Utils.getNoNil(y, 0);
        self.translationPart2.maxTrans[3] = Utils.getNoNil(z, 0);

        self.translationPart2.transTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.translationPart2#transTime"), 2)*1000;
        self.translationPart2.touchTransLimit = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.translationPart2#touchTransLimit"), 10);
    end;

-- tahometr

    local rotationPartNodeTahometr = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.rotationPartTahometr#index"));
    if rotationPartNodeTahometr ~= nil then
        self.rotationPartTahometr = {};
        self.rotationPartTahometr.node = rotationPartNodeTahometr;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rotationPartTahometr#minRot"));
        self.rotationPartTahometr.minRot = {};
        self.rotationPartTahometr.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartTahometr.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartTahometr.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rotationPartTahometr#maxRot"));
        self.rotationPartTahometr.maxRot = {};
        self.rotationPartTahometr.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartTahometr.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartTahometr.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartTahometr.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rotationPartTahometr#rotTime"), 2)*1000;
        self.rotationPartTahometr.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rotationPartTahometr#touchRotLimit"), 10));
    end;

-- toplivo

    local rotationPartNodeTanknadel = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.rotationPartTanknadel#index"));
    if rotationPartNodeTanknadel ~= nil then
        self.rotationPartTanknadel = {};
        self.rotationPartTanknadel.node = rotationPartNodeTanknadel;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rotationPartTanknadel#minRot"));
        self.rotationPartTanknadel.minRot = {};
        self.rotationPartTanknadel.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartTanknadel.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartTanknadel.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.rotationPartTanknadel#maxRot"));
        self.rotationPartTanknadel.maxRot = {};
        self.rotationPartTanknadel.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartTanknadel.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartTanknadel.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartTanknadel.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rotationPartTanknadel#rotTime"), 2)*1000;
        self.rotationPartTanknadel.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.rotationPartTanknadel#touchRotLimit"), 10));
    end;

-- voda

local rotationPartNodevoda1 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda1#index"));
    if rotationPartNodevoda1 ~= nil then
        self.rotationPartvoda1 = {};
        self.rotationPartvoda1.node = rotationPartNodevoda1;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda1#minRot"));
        self.rotationPartvoda1.minRot = {};
        self.rotationPartvoda1.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda1.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda1.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda1#maxRot"));
        self.rotationPartvoda1.maxRot = {};
        self.rotationPartvoda1.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda1.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda1.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda1.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda1#rotTime"), 2)*1000;
        self.rotationPartvoda1.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda1#touchRotLimit"), 10));
    end;
local rotationPartNodevoda2 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda2#index"));
    if rotationPartNodevoda2 ~= nil then
        self.rotationPartvoda2 = {};
        self.rotationPartvoda2.node = rotationPartNodevoda2;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda2#minRot"));
        self.rotationPartvoda2.minRot = {};
        self.rotationPartvoda2.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda2.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda2.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda2#maxRot"));
        self.rotationPartvoda2.maxRot = {};
        self.rotationPartvoda2.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda2.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda2.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda2.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda2#rotTime"), 2)*1000;
        self.rotationPartvoda2.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda2#touchRotLimit"), 10));
    end;
local rotationPartNodevoda3 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda3#index"));
    if rotationPartNodevoda3 ~= nil then
        self.rotationPartvoda3 = {};
        self.rotationPartvoda3.node = rotationPartNodevoda3;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda3#minRot"));
        self.rotationPartvoda3.minRot = {};
        self.rotationPartvoda3.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda3.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda3.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda3#maxRot"));
        self.rotationPartvoda3.maxRot = {};
        self.rotationPartvoda3.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda3.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda3.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda3.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda3#rotTime"), 2)*1000;
        self.rotationPartvoda3.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda3#touchRotLimit"), 10));
    end;
local rotationPartNodevoda4 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda4#index"));
    if rotationPartNodevoda4 ~= nil then
        self.rotationPartvoda4 = {};
        self.rotationPartvoda4.node = rotationPartNodevoda4;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda4#minRot"));
        self.rotationPartvoda4.minRot = {};
        self.rotationPartvoda4.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda4.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda4.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda4#maxRot"));
        self.rotationPartvoda4.maxRot = {};
        self.rotationPartvoda4.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda4.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda4.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda4.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda4#rotTime"), 2)*1000;
        self.rotationPartvoda4.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda4#touchRotLimit"), 10));
    end;
local rotationPartNodevoda5 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda5#index"));
    if rotationPartNodevoda5 ~= nil then
        self.rotationPartvoda5 = {};
        self.rotationPartvoda5.node = rotationPartNodevoda5;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda5#minRot"));
        self.rotationPartvoda5.minRot = {};
        self.rotationPartvoda5.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda5.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda5.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda5#maxRot"));
        self.rotationPartvoda5.maxRot = {};
        self.rotationPartvoda5.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda5.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda5.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda5.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda5#rotTime"), 2)*1000;
        self.rotationPartvoda5.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda5#touchRotLimit"), 10));
    end;
local rotationPartNodevoda6 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda6#index"));
    if rotationPartNodevoda6 ~= nil then
        self.rotationPartvoda6 = {};
        self.rotationPartvoda6.node = rotationPartNodevoda6;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda6#minRot"));
        self.rotationPartvoda6.minRot = {};
        self.rotationPartvoda6.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda6.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda6.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda6#maxRot"));
        self.rotationPartvoda6.maxRot = {};
        self.rotationPartvoda6.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda6.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda6.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda6.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda6#rotTime"), 2)*1000;
        self.rotationPartvoda6.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda6#touchRotLimit"), 10));
    end;
local rotationPartNodevoda7 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda7#index"));
    if rotationPartNodevoda7 ~= nil then
        self.rotationPartvoda7 = {};
        self.rotationPartvoda7.node = rotationPartNodevoda7;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda7#minRot"));
        self.rotationPartvoda7.minRot = {};
        self.rotationPartvoda7.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda7.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda7.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda7#maxRot"));
        self.rotationPartvoda7.maxRot = {};
        self.rotationPartvoda7.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda7.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda7.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda7.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda7#rotTime"), 2)*1000;
        self.rotationPartvoda7.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda7#touchRotLimit"), 10));
    end;
local rotationPartNodevoda8 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.voda8#index"));
    if rotationPartNodevoda8 ~= nil then
        self.rotationPartvoda8 = {};
        self.rotationPartvoda8.node = rotationPartNodevoda8;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda8#minRot"));
        self.rotationPartvoda8.minRot = {};
        self.rotationPartvoda8.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda8.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda8.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.voda8#maxRot"));
        self.rotationPartvoda8.maxRot = {};
        self.rotationPartvoda8.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartvoda8.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartvoda8.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartvoda8.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda8#rotTime"), 2)*1000;
        self.rotationPartvoda8.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.voda8#touchRotLimit"), 10));
    end;

-- manometr break

 local rotationPartNodemanometr = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr#index"));
    if rotationPartNodemanometr ~= nil then
        self.rotationPartmanometr = {};
        self.rotationPartmanometr.node = rotationPartNodemanometr;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr#minRot"));
        self.rotationPartmanometr.minRot = {};
        self.rotationPartmanometr.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr#maxRot"));
        self.rotationPartmanometr.maxRot = {};
        self.rotationPartmanometr.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr#rotTime"), 2)*1000;
        self.rotationPartmanometr.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr0 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr0#index"));
    if rotationPartNodemanometr0 ~= nil then
        self.rotationPartmanometr0 = {};
        self.rotationPartmanometr0.node = rotationPartNodemanometr0;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr0#minRot"));
        self.rotationPartmanometr0.minRot = {};
        self.rotationPartmanometr0.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr0.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr0.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr0#maxRot"));
        self.rotationPartmanometr0.maxRot = {};
        self.rotationPartmanometr0.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr0.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr0.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr0.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr0#rotTime"), 2)*1000;
        self.rotationPartmanometr0.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr0#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr1 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr1#index"));
    if rotationPartNodemanometr1 ~= nil then
        self.rotationPartmanometr1 = {};
        self.rotationPartmanometr1.node = rotationPartNodemanometr1;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr1#minRot"));
        self.rotationPartmanometr1.minRot = {};
        self.rotationPartmanometr1.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr1.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr1.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr1#maxRot"));
        self.rotationPartmanometr1.maxRot = {};
        self.rotationPartmanometr1.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr1.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr1.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr1.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr1#rotTime"), 2)*1000;
        self.rotationPartmanometr1.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr1#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr2 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr2#index"));
    if rotationPartNodemanometr2 ~= nil then
        self.rotationPartmanometr2 = {};
        self.rotationPartmanometr2.node = rotationPartNodemanometr2;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr2#minRot"));
        self.rotationPartmanometr2.minRot = {};
        self.rotationPartmanometr2.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr2.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr2.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr2#maxRot"));
        self.rotationPartmanometr2.maxRot = {};
        self.rotationPartmanometr2.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr2.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr2.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr2.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr2#rotTime"), 2)*1000;
        self.rotationPartmanometr2.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr2#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr3 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr3#index"));
    if rotationPartNodemanometr3 ~= nil then
        self.rotationPartmanometr3 = {};
        self.rotationPartmanometr3.node = rotationPartNodemanometr3;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr3#minRot"));
        self.rotationPartmanometr3.minRot = {};
        self.rotationPartmanometr3.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr3.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr3.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr3#maxRot"));
        self.rotationPartmanometr3.maxRot = {};
        self.rotationPartmanometr3.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr3.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr3.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr3.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr3#rotTime"), 2)*1000;
        self.rotationPartmanometr3.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr3#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr4 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr4#index"));
    if rotationPartNodemanometr4 ~= nil then
        self.rotationPartmanometr4 = {};
        self.rotationPartmanometr4.node = rotationPartNodemanometr4;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr4#minRot"));
        self.rotationPartmanometr4.minRot = {};
        self.rotationPartmanometr4.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr4.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr4.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr4#maxRot"));
        self.rotationPartmanometr4.maxRot = {};
        self.rotationPartmanometr4.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr4.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr4.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr4.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr4#rotTime"), 2)*1000;
        self.rotationPartmanometr4.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr4#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr5 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr5#index"));
    if rotationPartNodemanometr5 ~= nil then
        self.rotationPartmanometr5 = {};
        self.rotationPartmanometr5.node = rotationPartNodemanometr5;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr5#minRot"));
        self.rotationPartmanometr5.minRot = {};
        self.rotationPartmanometr5.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr5.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr5.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr5#maxRot"));
        self.rotationPartmanometr5.maxRot = {};
        self.rotationPartmanometr5.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr5.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr5.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr5.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr5#rotTime"), 2)*1000;
        self.rotationPartmanometr5.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr5#touchRotLimit"), 10));
    end;
local rotationPartNodemanometr6 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.manometr6#index"));
    if rotationPartNodemanometr6 ~= nil then
        self.rotationPartmanometr6 = {};
        self.rotationPartmanometr6.node = rotationPartNodemanometr6;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr6#minRot"));
        self.rotationPartmanometr6.minRot = {};
        self.rotationPartmanometr6.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr6.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr6.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.manometr6#maxRot"));
        self.rotationPartmanometr6.maxRot = {};
        self.rotationPartmanometr6.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartmanometr6.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartmanometr6.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartmanometr6.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr6#rotTime"), 2)*1000;
        self.rotationPartmanometr6.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.manometr6#touchRotLimit"), 10));
    end;

--ampermetr

local rotationPartNodeamper1 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.amper1#index"));
    if rotationPartNodeamper1 ~= nil then
        self.rotationPartamper1 = {};
        self.rotationPartamper1.node = rotationPartNodeamper1;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper1#minRot"));
        self.rotationPartamper1.minRot = {};
        self.rotationPartamper1.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper1.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper1.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper1#maxRot"));
        self.rotationPartamper1.maxRot = {};
        self.rotationPartamper1.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper1.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper1.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartamper1.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper1#rotTime"), 2)*1000;
        self.rotationPartamper1.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper1#touchRotLimit"), 10));
    end;
local rotationPartNodeamper2 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.amper2#index"));
    if rotationPartNodeamper2 ~= nil then
        self.rotationPartamper2 = {};
        self.rotationPartamper2.node = rotationPartNodeamper2;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper2#minRot"));
        self.rotationPartamper2.minRot = {};
        self.rotationPartamper2.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper2.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper2.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper2#maxRot"));
        self.rotationPartamper2.maxRot = {};
        self.rotationPartamper2.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper2.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper2.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartamper2.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper2#rotTime"), 2)*1000;
        self.rotationPartamper2.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper2#touchRotLimit"), 10));
    end;
local rotationPartNodeamper3 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.amper3#index"));
    if rotationPartNodeamper3 ~= nil then
        self.rotationPartamper3 = {};
        self.rotationPartamper3.node = rotationPartNodeamper3;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper3#minRot"));
        self.rotationPartamper3.minRot = {};
        self.rotationPartamper3.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper3.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper3.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper3#maxRot"));
        self.rotationPartamper3.maxRot = {};
        self.rotationPartamper3.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper3.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper3.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartamper3.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper3#rotTime"), 2)*1000;
        self.rotationPartamper3.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper3#touchRotLimit"), 10));
    end;
local rotationPartNodeamper4 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.amper4#index"));
    if rotationPartNodeamper4 ~= nil then
        self.rotationPartamper4 = {};
        self.rotationPartamper4.node = rotationPartNodeamper4;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper4#minRot"));
        self.rotationPartamper4.minRot = {};
        self.rotationPartamper4.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper4.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper4.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper4#maxRot"));
        self.rotationPartamper4.maxRot = {};
        self.rotationPartamper4.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper4.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper4.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartamper4.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper4#rotTime"), 2)*1000;
        self.rotationPartamper4.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper4#touchRotLimit"), 10));
    end;
local rotationPartNodeamper5 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.amper5#index"));
    if rotationPartNodeamper5 ~= nil then
        self.rotationPartamper5 = {};
        self.rotationPartamper5.node = rotationPartNodeamper5;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper5#minRot"));
        self.rotationPartamper5.minRot = {};
        self.rotationPartamper5.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper5.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper5.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper5#maxRot"));
        self.rotationPartamper5.maxRot = {};
        self.rotationPartamper5.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper5.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper5.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartamper5.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper5#rotTime"), 2)*1000;
        self.rotationPartamper5.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper5#touchRotLimit"), 10));
    end;
local rotationPartNodeamper6 = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.amper6#index"));
    if rotationPartNodeamper6 ~= nil then
        self.rotationPartamper6 = {};
        self.rotationPartamper6.node = rotationPartNodeamper6;

        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper6#minRot"));
        self.rotationPartamper6.minRot = {};
        self.rotationPartamper6.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper6.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper6.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.amper6#maxRot"));
        self.rotationPartamper6.maxRot = {};
        self.rotationPartamper6.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.rotationPartamper6.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.rotationPartamper6.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.rotationPartamper6.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper6#rotTime"), 2)*1000;
        self.rotationPartamper6.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.amper6#touchRotLimit"), 10));
    end;

-- wiper

    self.wiper1Active = false;
    self.wiper2Active = false;
    self.delayOnLeft = 0;
    self.delayOffLeft = 0;
    self.delayOnRight = 0;
    self.delayOffRight = 0;
    self.delayWischer1 = 0;
    self.delayWischer2 = 0;
    self.delayOn = 0;
    self.delayOff = 0;
    self.deltafo = 0;
    local wiper1Node = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.wiper1#index"));
    if wiper1Node ~= nil then
        self.wiper1 = {};
        self.wiper1.node = wiper1Node;
    local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.wiper1#minRot"));
        self.wiper1.minRot = {};
        self.wiper1.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.wiper1.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.wiper1.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.wiper1#maxRot"));
        self.wiper1.maxRot = {};
        self.wiper1.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.wiper1.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.wiper1.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        self.wiper1.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.wiper1#rotTime"), 2)*1000;
        self.wiper1.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.wiper1#touchRotLimit"), 10));
    end;

    local wiper2Node = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.wiper2#index"));
    if wiper2Node ~= nil then
        self.wiper2 = {};
        self.wiper2.node = wiper2Node;
        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.wiper2#minRot"));
        self.wiper2.minRot = {};
        self.wiper2.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.wiper2.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.wiper2.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.wiper2#maxRot"));
        self.wiper2.maxRot = {};
        self.wiper2.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.wiper2.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.wiper2.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        self.wiper2.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.wiper2#rotTime"), 2)*1000;
        self.wiper2.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.wiper2#touchRotLimit"), 10));
    end;

-- motor

    self.motor1Active = false;
    self.motor2Active = false;        
    self.delayOnLeft = 0;
    self.delayOffLeft = 0;
    self.delayOnRight = 0;
    self.delayOffRight = 0;
    self.delayKurs1 = 0;
    self.delayKurs2 = 0;
    self.delayOn = 0;
    self.delayOff = 0;
    self.deltafo = 0;

  local motor1Node = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.motor1#index"));
    if motor1Node ~= nil then
        self.motor1 = {};
        self.motor1.node = motor1Node;
        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.motor1#minRot"));
        self.motor1.minRot = {};
        self.motor1.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.motor1.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.motor1.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.motor1#maxRot"));
        self.motor1.maxRot = {};
        self.motor1.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.motor1.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.motor1.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        self.motor1.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.motor1#rotTime"), 2)*70;
        self.motor1.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.motor1#touchRotLimit"), 10));
    end;

  local motor2Node = Utils.indexToObject(self.components, getXMLString(self.xmlFile, "vehicle.motor2#index"));
    if motor2Node ~= nil then
        self.motor2 = {};
        self.motor2.node = motor2Node;
        local x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.motor2#minRot"));
        self.motor2.minRot = {};
        self.motor2.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.motor2.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.motor2.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        x, y, z = Utils.getVectorFromString(getXMLString(self.xmlFile, "vehicle.motor2#maxRot"));
        self.motor2.maxRot = {};
        self.motor2.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.motor2.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.motor2.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));
        self.motor2.rotTime = Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.motor2#rotTime"), 2)*70;
        self.motor2.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(self.xmlFile, "vehicle.motor2#touchRotLimit"), 10));
    end;

-- kardan

    self.cShafts = {};

    local i = -1;
    while true do
        i = i + 1;
        local index = getXMLString(self.xmlFile, string.format('vehicle.cardanShaft.shaft(%d)#index', i));
        if index == nil then break; end;
        local cs = {};
        cs.idx = Utils.indexToObject(self.components, index);
        cs.spd = getXMLFloat(self.xmlFile, string.format('vehicle.cardanShaft.shaft(%d)#speed', i));
        table.insert(self.cShafts, cs);
    end;

    self.movingFlag = self:getNextDirtyFlag();
end;

function pointers:delete()
end;

function pointers:mouseEvent(posX, posY, isDown, isUp, button)
end;

function pointers:keyEvent(unicode, sym, modifier, isDown)
    if isDown and sym == Input.KEY_KP_0 then
        self.helpPanel = not self.helpPanel;
    end;
    if isDown and sym == Input.KEY_KP_9 then
        if self.isServer then
            self.rotationMaxrightdoor = not self.rotationMaxrightdoor;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(9, self));
        end;
    end;
    if isDown and sym == Input.KEY_KP_7 then
        if self.isServer then
            self.rotationMaxleftDoor = not self.rotationMaxleftDoor;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(7, self));
        end;
    end;
    if isDown and sym == Input.KEY_KP_4 then
        if self.isServer then
            self.rotationMaxleftRuchka = not self.rotationMaxleftRuchka;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(7, self));
        end;
    end;
    if isDown and sym == Input.KEY_KP_5 then
        if self.isServer then
            self.rotationMaxrightRuchka = not self.rotationMaxrightRuchka;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(7, self));
        end;
    end;
    if isDown and sym == Input.KEY_KP_8 then
        if self.isServer then
            self.rotationMaxkozyrek = not self.rotationMaxkozyrek;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(5, self));
        end;
    end;
     if isDown and sym == Input.KEY_KP_divide then
        if self.isServer then
            self.wiper1Active = not self.wiper1Active;
            self.wiper2Active = not self.wiper2Active;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(1, self));
        end;
     end;
    if isDown and sym == Input.KEY_KP_4 then
        if self.isServer then
            self.translationMax = not self.translationMax;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(4, self));
        end;
    end;
    if isDown and sym == Input.KEY_KP_5 then
        if self.isServer then
            self.translationMax2 = not self.translationMax2;
            self:raiseDirtyFlags(self.movingFlag);
        else
            g_client:getServerConnection():sendEvent(pointersEvent:new(5, self));
        end;
    end;
end;

function pointers:readUpdateStream(streamId, timestamp, connection)
    if connection:getIsServer() then
        self.rotationMaxrightdoor = streamReadBool(streamId);
        self.rotationMaxleftDoor = streamReadBool(streamId);
        self.rotationMaxleftRuchka = streamReadBool(streamId);
        self.rotationMaxrightRuchka = streamReadBool(streamId);
        self.rotationMaxkozyrek = streamReadBool(streamId);
        self.wiper1Active = streamReadBool(streamId);
        self.wiper2Active = streamReadBool(streamId);
        self.translationMax = streamReadBool(streamId);
        self.translationMax2 = streamReadBool(streamId);
    end;
end;

function pointers:writeUpdateStream(streamId, connection, dirtyMask)
    if not connection:getIsServer() then
        streamWriteBool(streamId, self.rotationMaxrightdoor);
        streamWriteBool(streamId, self.rotationMaxleftDoor);
        streamWriteBool(streamId, self.rotationMaxleftRuchka);
        streamWriteBool(streamId, self.rotationMaxrightRuchka);
        streamWriteBool(streamId, self.rotationMaxkozyrek);
        streamWriteBool(streamId, self.wiper1Active);
        streamWriteBool(streamId, self.wiper2Active);
        streamWriteBool(streamId, self.translationMax);
        streamWriteBool(streamId, self.translationMax2);
    end;
end;

function pointers:update(dt)

--other to motor started

if self.isMotorStarted then
self.rotationMaxmanometr1 = true;
self.rotationMaxmanometr2 = false;
self.rotationMaxmanometr5 = true;
self.rotationMaxmanometr6 = false;
self.rotationMaxvoda1 = true;
self.rotationMaxvoda2 = false;
self.rotationMaxvoda3 = true;
self.rotationMaxvoda4 = false;
self.rotationMaxvoda5 = true;
self.rotationMaxvoda6 = false;
self.rotationMaxvoda7 = true;
self.rotationMaxvoda8 = false;
self.rotationMaxamper1 = true;
self.rotationMaxamper2 = true;
self.rotationMaxamper3 = true;
self.rotationMaxamper4 = false;
self.rotationMaxamper5 = false;
self.rotationMaxamper6 = false;
         else
self.rotationMaxmanometr2 = true;
self.rotationMaxmanometr1 = false;
self.rotationMaxmanometr6 = true;
self.rotationMaxmanometr5 = false;
self.rotationMaxvoda1 = false;
self.rotationMaxvoda2 = true;
self.rotationMaxvoda3 = false;
self.rotationMaxvoda4 = true;
self.rotationMaxvoda5 = false;
self.rotationMaxvoda6 = true;
self.rotationMaxvoda7 = false;
self.rotationMaxvoda8 = true;
self.rotationMaxamper1 = false;
self.rotationMaxamper2 = false;
self.rotationMaxamper3 = false;
self.rotationMaxamper4 = true;
self.rotationMaxamper5 = true;
self.rotationMaxamper6 = true;
end;

-- manometr break

if self.brakeLightsVisibility then
self.rotationMaxmanometr = true;
self.rotationMaxmanometr0 = false;
self.rotationMaxmanometr3 = true;
self.rotationMaxmanometr4 = false;
         else
self.rotationMaxmanometr0 = true;
self.rotationMaxmanometr = false;
self.rotationMaxmanometr4 = true;
self.rotationMaxmanometr3 = false;
    end;

if self.rotationMaxmanometr == true then
if self.rotationPartmanometr ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr.maxRot, self.rotationPartmanometr.minRot, 3, self.rotationPartmanometr.rotTime, dt, not self.rotationMaxmanometr);
           setRotation(self.rotationPartmanometr.node, unpack(newRot));
       end;
    end;

if self.rotationMaxmanometr0 == true then
if self.rotationPartmanometr0 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr0.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr0.maxRot, self.rotationPartmanometr0.minRot, 3, self.rotationPartmanometr0.rotTime, dt, not self.rotationMaxmanometr0);
           setRotation(self.rotationPartmanometr0.node, unpack(newRot));
       end;
   end;
if self.rotationMaxmanometr1 == true then
if self.rotationPartmanometr1 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr1.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr1.maxRot, self.rotationPartmanometr1.minRot, 3, self.rotationPartmanometr1.rotTime, dt, not self.rotationMaxmanometr1);
           setRotation(self.rotationPartmanometr1.node, unpack(newRot));
       end;
   end;
if self.rotationMaxmanometr2 == true then
if self.rotationPartmanometr2 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr2.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr2.maxRot, self.rotationPartmanometr2.minRot, 3, self.rotationPartmanometr2.rotTime, dt, not self.rotationMaxmanometr2);
           setRotation(self.rotationPartmanometr2.node, unpack(newRot));
       end;
   end;
if self.rotationMaxmanometr3 == true then
if self.rotationPartmanometr3 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr3.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr3.maxRot, self.rotationPartmanometr3.minRot, 3, self.rotationPartmanometr3.rotTime, dt, not self.rotationMaxmanometr3);
           setRotation(self.rotationPartmanometr3.node, unpack(newRot));
       end;
   end;
if self.rotationMaxmanometr4 == true then
if self.rotationPartmanometr4 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr4.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr4.maxRot, self.rotationPartmanometr4.minRot, 3, self.rotationPartmanometr4.rotTime, dt, not self.rotationMaxmanometr4);
           setRotation(self.rotationPartmanometr4.node, unpack(newRot));
       end;
   end;
if self.rotationMaxmanometr5 == true then
if self.rotationPartmanometr5 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr5.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr5.maxRot, self.rotationPartmanometr5.minRot, 3, self.rotationPartmanometr5.rotTime, dt, not self.rotationMaxmanometr5);
           setRotation(self.rotationPartmanometr5.node, unpack(newRot));
       end;
   end;
if self.rotationMaxmanometr6 == true then
if self.rotationPartmanometr6 ~= nil then
           local x, y, z = getRotation(self.rotationPartmanometr6.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartmanometr6.maxRot, self.rotationPartmanometr6.minRot, 3, self.rotationPartmanometr6.rotTime, dt, not self.rotationMaxmanometr6);
           setRotation(self.rotationPartmanometr6.node, unpack(newRot));
       end;
   end;

-- door

        if self.rotationPartrightdoor ~= nil then
           local x, y, z = getRotation(self.rotationPartrightdoor.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartrightdoor.maxRot, self.rotationPartrightdoor.minRot, 3, self.rotationPartrightdoor.rotTime, dt, not self.rotationMaxrightdoor);
           setRotation(self.rotationPartrightdoor.node, unpack(newRot));
        end;
        if self.rotationPartleftDoor ~= nil then
           local x, y, z = getRotation(self.rotationPartleftDoor.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartleftDoor.maxRot, self.rotationPartleftDoor.minRot, 3, self.rotationPartleftDoor.rotTime, dt, not self.rotationMaxleftDoor);
           setRotation(self.rotationPartleftDoor.node, unpack(newRot));
        end;
        if self.rotationPartleftRuchka ~= nil then
           local x, y, z = getRotation(self.rotationPartleftRuchka.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartleftRuchka.maxRot, self.rotationPartleftRuchka.minRot, 3, self.rotationPartleftRuchka.rotTime, dt, not self.rotationMaxleftRuchka);
           setRotation(self.rotationPartleftRuchka.node, unpack(newRot));
        end;
        if self.rotationPartrightRuchka ~= nil then
           local x, y, z = getRotation(self.rotationPartrightRuchka.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartrightRuchka.maxRot, self.rotationPartrightRuchka.minRot, 3, self.rotationPartrightRuchka.rotTime, dt, not self.rotationMaxrightRuchka);
           setRotation(self.rotationPartrightRuchka.node, unpack(newRot));
        end;
        if self.rotationPartkozyrek ~= nil then
           local x, y, z = getRotation(self.rotationPartkozyrek.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartkozyrek.maxRot, self.rotationPartkozyrek.minRot, 3, self.rotationPartkozyrek.rotTime, dt, not self.rotationMaxkozyrek);
           setRotation(self.rotationPartkozyrek.node, unpack(newRot));
        end;
    if self.translationPart ~= nil then
        local x, y, z = getTranslation(self.translationPart.node);
        local trans = {x,y,z};
        local newTrans = Utils.getMovedLimitedValues(trans, self.translationPart.maxTrans, self.translationPart.minTrans, 3, self.translationPart.transTime, dt, not self.translationMax);
        setTranslation(self.translationPart.node, unpack(newTrans));
    end;
    if self.translationPart2 ~= nil then
        local x, y, z = getTranslation(self.translationPart2.node);
        local trans = {x,y,z};
        local newTrans = Utils.getMovedLimitedValues(trans, self.translationPart2.maxTrans, self.translationPart2.minTrans, 3, self.translationPart2.transTime, dt, not self.translationMax2);
        setTranslation(self.translationPart2.node, unpack(newTrans));
    end;

-- tahometr

        local maxDrehzahl = 1300;
    if self.rotationPartTahometr ~= nil then
        local x, y, z = getRotation(self.rotationPartTahometr.node);
        y = ((self.rotationPartTahometr.maxRot[2] - self.rotationPartTahometr.minRot[2]) / maxDrehzahl) * self.motor.lastMotorRpm + self.rotationPartTahometr.minRot[2];
        setRotation(self.rotationPartTahometr.node, x, y ,z);
    end;

-- toplivo

    if self.rotationPartTanknadel ~= nil then
        local x, y, z = getRotation(self.rotationPartTanknadel.node);
        y = ((self.rotationPartTanknadel.maxRot[2] - self.rotationPartTanknadel.minRot[2]) / self.fuelCapacity) * self.fuelFillLevel + self.rotationPartTanknadel.minRot[2];
        setRotation(self.rotationPartTanknadel.node, x, y ,z);
    end;

-- voda

if self.rotationMaxvoda1 == true then
if self.rotationPartvoda1 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda1.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda1.maxRot, self.rotationPartvoda1.minRot, 3, self.rotationPartvoda1.rotTime, dt, not self.rotationMaxvoda1);
           setRotation(self.rotationPartvoda1.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda2 == true then
if self.rotationPartvoda2 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda2.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda2.maxRot, self.rotationPartvoda2.minRot, 3, self.rotationPartvoda2.rotTime, dt, not self.rotationMaxvoda2);
           setRotation(self.rotationPartvoda2.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda3 == true then
if self.rotationPartvoda3 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda3.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda3.maxRot, self.rotationPartvoda3.minRot, 3, self.rotationPartvoda3.rotTime, dt, not self.rotationMaxvoda3);
           setRotation(self.rotationPartvoda3.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda4 == true then
if self.rotationPartvoda4 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda4.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda4.maxRot, self.rotationPartvoda4.minRot, 3, self.rotationPartvoda4.rotTime, dt, not self.rotationMaxvoda4);
           setRotation(self.rotationPartvoda4.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda5 == true then
if self.rotationPartvoda5 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda5.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda5.maxRot, self.rotationPartvoda5.minRot, 3, self.rotationPartvoda5.rotTime, dt, not self.rotationMaxvoda5);
           setRotation(self.rotationPartvoda5.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda6 == true then
if self.rotationPartvoda6 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda6.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda6.maxRot, self.rotationPartvoda6.minRot, 3, self.rotationPartvoda6.rotTime, dt, not self.rotationMaxvoda6);
           setRotation(self.rotationPartvoda6.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda7 == true then
if self.rotationPartvoda7 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda7.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda7.maxRot, self.rotationPartvoda7.minRot, 3, self.rotationPartvoda7.rotTime, dt, not self.rotationMaxvoda7);
           setRotation(self.rotationPartvoda7.node, unpack(newRot));
       end;
   end;
if self.rotationMaxvoda8 == true then
if self.rotationPartvoda8 ~= nil then
           local x, y, z = getRotation(self.rotationPartvoda8.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartvoda8.maxRot, self.rotationPartvoda8.minRot, 3, self.rotationPartvoda8.rotTime, dt, not self.rotationMaxvoda8);
           setRotation(self.rotationPartvoda8.node, unpack(newRot));
       end;
   end;

-- ampermetr

if self.rotationMaxamper1 == true then
if self.rotationPartamper1 ~= nil then
           local x, y, z = getRotation(self.rotationPartamper1.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartamper1.maxRot, self.rotationPartamper1.minRot, 3, self.rotationPartamper1.rotTime, dt, not self.rotationMaxamper1);
           setRotation(self.rotationPartamper1.node, unpack(newRot));
       end;
   end;
if self.rotationMaxamper2 == true then
if self.rotationPartamper2 ~= nil then
           local x, y, z = getRotation(self.rotationPartamper2.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartamper2.maxRot, self.rotationPartamper2.minRot, 3, self.rotationPartamper2.rotTime, dt, not self.rotationMaxamper2);
           setRotation(self.rotationPartamper2.node, unpack(newRot));
       end;
   end;
if self.rotationMaxamper3 == true then
if self.rotationPartamper3 ~= nil then
           local x, y, z = getRotation(self.rotationPartamper3.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartamper3.maxRot, self.rotationPartamper3.minRot, 3, self.rotationPartamper3.rotTime, dt, not self.rotationMaxamper3);
           setRotation(self.rotationPartamper3.node, unpack(newRot));
       end;
   end;
if self.rotationMaxamper4 == true then
if self.rotationPartamper4 ~= nil then
           local x, y, z = getRotation(self.rotationPartamper4.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartamper4.maxRot, self.rotationPartamper4.minRot, 3, self.rotationPartamper4.rotTime, dt, not self.rotationMaxamper4);
           setRotation(self.rotationPartamper4.node, unpack(newRot));
       end;
   end;
if self.rotationMaxamper5 == true then
if self.rotationPartamper5 ~= nil then
           local x, y, z = getRotation(self.rotationPartamper5.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartamper5.maxRot, self.rotationPartamper5.minRot, 3, self.rotationPartamper5.rotTime, dt, not self.rotationMaxamper5);
           setRotation(self.rotationPartamper5.node, unpack(newRot));
       end;
   end;
if self.rotationMaxamper6 == true then
if self.rotationPartamper6 ~= nil then
           local x, y, z = getRotation(self.rotationPartamper6.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.rotationPartamper6.maxRot, self.rotationPartamper6.minRot, 3, self.rotationPartamper6.rotTime, dt, not self.rotationMaxamper6);
           setRotation(self.rotationPartamper6.node, unpack(newRot));
       end;
   end;

-- wiper

        if self.wiper1Active then
        if self.delayWischer1 >= 0 then
            self.delayWischer1 = self.delayWischer1 -dt;
        end;
        if self.delayWischer2 >= 0 then
            self.delayWischer2 = self.delayWischer2 -dt;
        end;
        if not self.wiper1Max then
           if self.delayWischer1 < 0 then
                self.delayWischer2 = 1000;
                self.wiper1Max = true;
                self.wiper2Max = true;
            end;
        end;
        if self.wiper1Max then
            if self.delayWischer2 < 0 then
                self.delayWischer1 = 1000;
                self.wiper1Max = false;
                self.wiper2Max = false;
            end;
        end;
    else
        self.wiper1Max = false;
        self.wiper2Max = false;
    end;

    if self.wiper1 ~= nil then
           local x, y, z = getRotation(self.wiper1.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.wiper1.maxRot, self.wiper1.minRot, 3, self.wiper1.rotTime, dt, not self.wiper1Max);
           setRotation(self.wiper1.node, unpack(newRot));
    end;

    if self.wiper2 ~= nil then
           local x, y, z = getRotation(self.wiper2.node);
           local rot = {x,y,z};
           local newRot = Utils.getMovedLimitedValues(rot, self.wiper2.maxRot, self.wiper2.minRot, 3, self.wiper2.rotTime, dt, not self.wiper2Max);
           setRotation(self.wiper2.node, unpack(newRot));
    end;

-- motor

        if self.motor1Active ~= nil and self.isMotorStarted then
               if self.delayKurs1 >= 0 then
                self.delayKurs1 = self.delayKurs1 -dt;
            end;
               if self.delayKurs2 >= 0 then
                self.delayKurs2 = self.delayKurs2 -dt;
            end;
                 if not self.motor1Max then
                   if self.delayKurs1 < 0 then
                    self.delayKurs2 = 70;
                    self.motor1Max = true;
                    self.motor2Max = true;
                end;
            end;
                     if self.motor1Max then
                   if self.delayKurs2 < 0 then
                    self.delayKurs1 = 70;
                    self.motor1Max = false;
                    self.motor2Max = false;
                end;
            end;
        else
            self.motor1Max = false;
            self.motor2Max = false;
        end;

      if self.motor1 ~= nil then
            local x, y, z = getRotation(self.motor1.node);
            local rot = {x,y,z};
            local newRot = Utils.getMovedLimitedValues(rot, self.motor1.maxRot, self.motor1.minRot, 3, self.motor1.rotTime, dt, not self.motor1Max);
            setRotation(self.motor1.node, unpack(newRot));
        end;

      if self.motor2 ~= nil then
            local x, y, z = getRotation(self.motor2.node);
            local rot = {x,y,z};
            local newRot = Utils.getMovedLimitedValues(rot, self.motor2.maxRot, self.motor2.minRot, 3, self.motor2.rotTime, dt, not self.motor2Max);
            setRotation(self.motor2.node, unpack(newRot));
        end;
end;

function pointers:draw()

end;

function pointers:onEnter()
end;

function pointers:onLeave()
end;

function pointers:attachImplement(implement)

    local jointType = implement.object.attacherJoint.jointType;
    local jointIndex = implement.jointDescIndex;

    if jointType == Vehicle.JOINTTYPE_IMPLEMENT then
        if jointIndex == 1 then
    setVisibility(self.thenlight, self.thenlightActive);
    self.thenlightActive = true;
    else
    setVisibility(self.thenlight, self.thenlightActive);
    self.thenlightActive = false;
    end;
   end;
end;

function pointers:detachImplement(implementIndex)

    local implement = self.attachedImplements[implementIndex];
    local jointIndex = implement.jointDescIndex;

    if jointIndex == 1 then
    setVisibility(self.thenlight, self.thenlightActive);
    self.thenlightActive = false;
    end;
end;

function pointers:updateTick(dt)

-- kardan

    local x,y,z = getRotation(self.wheels[1].driveNode);
    for i,shaft in pairs(self.cShafts) do
        setRotation(shaft.idx, 0,0, x*shaft.spd);            
    end;
end;

function pointers:validateAttacherJoint(implement, jointDesc, dt)
    return true;
end;


pointersEvent = {};
dt75Event_mt = Class(pointersEvent, Event);

InitEventClass(pointersEvent, "pointersEvent");

function pointersEvent:emptyNew()
    local self = Event:new(dt75Event_mt);
    print("emptyNew");
    return self;
end;

function pointersEvent:new(numKey, object)
    local self = pointersEvent:emptyNew();
    self.numKey = numKey;
    self.object = object;
    return self;
end;

function pointersEvent:readStream(streamId, connection)
    local numKey = streamReadInt8(streamId);
    local id = streamReadInt32(streamId);
    local object = networkGetObject(id);
    if object ~= nil then
        if numKey == 9 then object.rotationMaxrightdoor = not object.rotationMaxrightdoor; end;
        if numKey == 7 then object.rotationMaxleftDoor = not object.rotationMaxleftDoor; end;
        if numKey == 8 then object.rotationMaxkozyrek = not object.rotationMaxkozyrek; end;
        if numKey == 1 then object.wiper1Active = not object.wiper1Active; object.wiper2Active = not object.wiper2Active; end;
        if numKey == 4 then object.translationMax = not object.translationMax; end;
        if numKey == 5 then object.translationMax2 = not object.translationMax2; end;
    end;
end;

function pointersEvent:writeStream(streamId, connection)
    streamWriteInt8(streamId, self.numKey);
    streamWriteInt32(streamId, networkGetObjectId(self.object));
end;
