variablePuntePallet = {};
function variablePuntePallet.prerequisitesPresent(specializations) return true; end;
function variablePuntePallet:load(xmlFile)
	self.setcurrentPuntePallet = SpecializationUtil.callSpecializationsFunction("setcurrentPuntePallet");
	self.setcurrentPosDir = SpecializationUtil.callSpecializationsFunction("setcurrentPosDir");
	self.setcurrentPuntaDx = SpecializationUtil.callSpecializationsFunction("setcurrentPuntaDx"); 
	self.setcurrentPuntaSx = SpecializationUtil.callSpecializationsFunction("setcurrentPuntaSx"); self.currentPuntePallet = 1;
    local fermiSound = getXMLString(xmlFile, "vehicle.fermiSound#file"); fermiSound  = Utils.getFilename(fermiSound, self.baseDirectory);
    self.fermiSound = createSample("fermiSound"); loadSample(self.fermiSound, fermiSound, false); end;
function variablePuntePallet:delete() end;
function variablePuntePallet:readStream(streamId, connection) self:setcurrentPuntePallet(streamReadInt8(streamId), true); self:setcurrentPosDir(streamReadInt8(streamId), true); self:setcurrentPuntaDx(streamReadInt8(streamId), true); self:setcurrentPuntaSx(streamReadInt8(streamId), true); end;
function variablePuntePallet:writeStream(streamId, connection) streamWriteInt8(streamId, self.currentPuntePallet); streamWriteInt8(streamId, self.currentPosDirs); streamWriteInt8(streamId, self.currentPuntaDx); streamWriteInt8(streamId, self.currentPuntaSx); end;
function variablePuntePallet:setcurrentPuntePallet(int, noEventSend) self.currentPuntePallet = int; setcurrentPuntePalletEvent.sendEvent(self, int, noEventSend); end;
function variablePuntePallet:setcurrentPosDir(int, noEventSend) self.currentPosDir = int; setcurrentPosDirEvent.sendEvent(self, int, noEventSend); end;
function variablePuntePallet:setcurrentPuntaDx(int, noEventSend) self.currentPuntaDx = int; setcurrentPuntaDxEvent.sendEvent(self, int, noEventSend); end;
function variablePuntePallet:setcurrentPuntaSx(int, noEventSend) self.currentPuntaSx = int; setcurrentPuntaSxEvent.sendEvent(self, int, noEventSend); end;
function variablePuntePallet:loadFromAttributesAndNodes(xmlFile, key, resetVehicles) return BaseMission.VEHICLE_LOAD_OK; end;
function variablePuntePallet:getSaveAttributesAndNodes(nodeIdent) local attributes = 'currentPuntaDx="' .. self.currentPuntaDx .. '" currentPuntaSx="' .. self.currentPuntaSx .. '"'; return attributes; end;
function variablePuntePallet:mouseEvent(posX, posY, isDown, isUp, button) end;
function variablePuntePallet:keyEvent(unicode, sym, modifier, isDown) end;
function variablePuntePallet:update(dt)
	if g_currentMission.player ~= nil and g_currentMission.player.isEntered then
		local px, py, pz = getWorldTranslation(g_currentMission.player.rootNode); local tx, ty, tz = getWorldTranslation(self.components[1].node);
		if self.attacherVehicle ~= nil and Utils.vector3Length(px-tx, py-ty, pz-tz) < 4 then
			if InputBinding.hasEvent(InputBinding.CAMERA_SWITCH) then 
				if     self.currentPuntePallet == 1 and not self:getIsAnimationPlaying("fermi") then self:setcurrentPuntePallet(5);
				elseif self.currentPuntePallet == 5 and not self:getIsAnimationPlaying("fermi") then self:setcurrentPuntePallet(1); end; end;
			if InputBinding.hasEvent(InputBinding.attachCSZ) then
				if     self.currentPuntePallet == 1 and not self:getIsAnimationPlaying("fermi") then self:setcurrentPuntePallet(2);
				elseif self.currentPuntePallet == 3 and not self:getIsAnimationPlaying("fermi") then self:setcurrentPuntePallet(0);				
				elseif self.currentPuntePallet == 5 and not self:getIsAnimationPlaying("fermi") then self:setcurrentPuntePallet(6);				
				elseif self.currentPuntePallet == 7 and not self:getIsAnimationPlaying("fermi") then self:setcurrentPuntePallet(4); end; end;
			if     self.currentPuntePallet == 3 or self.currentPuntePallet == 7 and not self:getIsAnimationPlaying("fermi") then g_currentMission:addHelpButtonText(g_i18n:getText("fermiClose"), InputBinding.attachCSZ);
			elseif self.currentPuntePallet == 1 or self.currentPuntePallet == 5 and not self:getIsAnimationPlaying("fermi") then g_currentMission:addHelpButtonText(g_i18n:getText("fermiOpen"), InputBinding.attachCSZ); g_currentMission:addHelpButtonText(g_i18n:getText("cambiaOggetto"), InputBinding.CAMERA_SWITCH); end;
			if self.currentPuntePallet == 1 or self.currentPuntePallet == 3 then if self.positions > 12 then g_currentMission:addExtraPrintText(g_i18n:getText("punteSinistra")..g_i18n:getText("puntaDestraBA")..g_i18n:getText("puntaSinistraBI")); else g_currentMission:addExtraPrintText(g_i18n:getText("puntaDestraA")..g_i18n:getText("puntaSinistraI")); end; 
			elseif self.currentPuntePallet == 5 or self.currentPuntePallet == 7 then if self.positions > 12 then g_currentMission:addExtraPrintText(g_i18n:getText("punteSinistra")..g_i18n:getText("puntaDestraBI")..g_i18n:getText("puntaSinistraBA")); else g_currentMission:addExtraPrintText(g_i18n:getText("puntaDestraI")..g_i18n:getText("puntaSinistraA")); end; end;
			if self.currentPosDir == 0 and (self.currentPuntePallet == 3 or self.currentPuntePallet == 7) then
				if InputBinding.hasEvent(InputBinding.selectLeftKP)  then self:setcurrentPosDir(-1); end; if InputBinding.hasEvent(InputBinding.selectRightKP) then self:setcurrentPosDir(1); end; 
				if self.currentPuntePallet == 3 then 
					if self.currentPuntaDx < self.currentPuntaSx - 2 then g_currentMission:addHelpButtonText(g_i18n:getText("puntaSpostaDestra"), InputBinding.selectRightKP); end; 
					if self.currentPuntaDx / 2 > 1 then g_currentMission:addHelpButtonText(g_i18n:getText("puntaSpostaSinistra"), InputBinding.selectLeftKP); end; end; 
				if self.currentPuntePallet == 7 then 
					if self.currentPuntaSx / 2 < self.positions and self.currentPuntaSx < self.currentPuntaDxB - 2 then g_currentMission:addHelpButtonText(g_i18n:getText("puntaSpostaDestra"), InputBinding.selectRightKP); end; 
					if self.currentPuntaSx - 2 > self.currentPuntaDx then g_currentMission:addHelpButtonText(g_i18n:getText("puntaSpostaSinistra"), InputBinding.selectLeftKP); end; end; end; end; end; end;
function variablePuntePallet:updateTick(dt)
	if     self.currentPuntePallet == 0 then self:playAnimation("fermoSinistra", -4, nil, true); self:setcurrentPuntePallet(1); setTranslation(self.fermiDx, self.currentPuntaDx/2*self.dist-self.distC, 0.756, 0.084); playSample(self.fermiSound, 1, 1, 0);
	elseif self.currentPuntePallet == 2 then self:playAnimation("fermoSinistra", 1, nil, true); self:setcurrentPuntePallet(3); 
	elseif self.currentPuntePallet == 4 then self:playAnimation("fermoDestra", -4, nil, true); self:setcurrentPuntePallet(5); setTranslation(self.fermiSx, self.currentPuntaSx/2*self.dist-self.distC, 0.756, 0.084); playSample(self.fermiSound, 1, 1, 0);
	elseif self.currentPuntePallet == 6 then self:playAnimation("fermoDestra", 1, nil, true); self:setcurrentPuntePallet(7); end;
	if self.currentPuntePallet == 3 then
		if self.currentPuntaDx ==  2 then if self.currentPosDir == 1 and self.pos02 == true then self:setcurrentPuntaDx(3); self.pos01 = true; self.pos02 = false; end; end;
		if self.currentPuntaDx ==  4 then if self.currentPosDir == 1 and self.pos03 == true then self:setcurrentPuntaDx(5); self.pos02 = true; self.pos03 = false; end; if self.currentPosDir == -1 and self.pos01 == true then self:setcurrentPuntaDx(1); self.pos02 = true; self.pos01 = false; end; end;
		if self.currentPuntaDx ==  6 then if self.currentPosDir == 1 and self.pos04 == true then self:setcurrentPuntaDx(7); self.pos03 = true; self.pos04 = false; end; if self.currentPosDir == -1 and self.pos02 == true then self:setcurrentPuntaDx(3); self.pos03 = true; self.pos02 = false; end; end;
		if self.currentPuntaDx ==  8 then if self.currentPosDir == 1 and self.pos05 == true then self:setcurrentPuntaDx(9); self.pos04 = true; self.pos05 = false; end; if self.currentPosDir == -1 and self.pos03 == true then self:setcurrentPuntaDx(5); self.pos04 = true; self.pos03 = false; end; end;
		if self.currentPuntaDx == 10 then if self.currentPosDir == 1 and self.pos06 == true then self:setcurrentPuntaDx(11); self.pos05 = true; self.pos06 = false; end; if self.currentPosDir == -1 and self.pos04 == true then self:setcurrentPuntaDx(7); self.pos05 = true; self.pos04 = false; end; end;
		if self.currentPuntaDx == 12 then if self.currentPosDir == 1 and self.pos07 == true then self:setcurrentPuntaDx(13); self.pos06 = true; self.pos07 = false; end; if self.currentPosDir == -1 and self.pos05 == true then self:setcurrentPuntaDx(9); self.pos06 = true; self.pos05 = false; end; end;
		if self.currentPuntaDx == 14 then if self.currentPosDir == 1 and self.pos08 == true then self:setcurrentPuntaDx(15); self.pos07 = true; self.pos08 = false; end; if self.currentPosDir == -1 and self.pos06 == true then self:setcurrentPuntaDx(11); self.pos07 = true; self.pos06 = false; end; end;
		if self.currentPuntaDx == 16 then if self.currentPosDir == 1 and self.pos09 == true then self:setcurrentPuntaDx(17); self.pos08 = true; self.pos09 = false; end; if self.currentPosDir == -1 and self.pos07 == true then self:setcurrentPuntaDx(13); self.pos08 = true; self.pos07 = false; end; end;
		if self.currentPuntaDx == 18 then if self.currentPosDir == 1 and self.pos10 == true then self:setcurrentPuntaDx(19); self.pos09 = true; self.pos10 = false; end; if self.currentPosDir == -1 and self.pos08 == true then self:setcurrentPuntaDx(15); self.pos09 = true; self.pos08 = false; end; end;
		if self.currentPuntaDx == 20 then if self.currentPosDir == 1 and self.pos11 == true then self:setcurrentPuntaDx(21); self.pos10 = true; self.pos11 = false; end; if self.currentPosDir == -1 and self.pos09 == true then self:setcurrentPuntaDx(17); self.pos10 = true; self.pos09 = false; end; end;
		if self.currentPuntaDx == 22 then if self.currentPosDir == 1 and self.pos12 == true then self:setcurrentPuntaDx(23); self.pos11 = true; self.pos12 = false; end; if self.currentPosDir == -1 and self.pos10 == true then self:setcurrentPuntaDx(19); self.pos11 = true; self.pos10 = false; end; end;
		if self.currentPuntaDx == 24 then                                                                                                                                if self.currentPosDir == -1 and self.pos11 == true then self:setcurrentPuntaDx(21); self.pos12 = true; self.pos11 = false; end; end;
	if self.positions > 12 then 
		if self.currentPuntaDx == 24 then if self.currentPosDir == 1 and self.pos13 == true then self:setcurrentPuntaDx(25); self.pos12 = true; self.pos13 = false; end; end;
		if self.currentPuntaDx == 26 then if self.currentPosDir == 1 and self.pos14 == true then self:setcurrentPuntaDx(27); self.pos13 = true; self.pos14 = false; end; if self.currentPosDir == -1 and self.pos12 == true then self:setcurrentPuntaDx(23); self.pos13 = true; self.pos12 = false; end; end;
		if self.currentPuntaDx == 28 then if self.currentPosDir == 1 and self.pos15 == true then self:setcurrentPuntaDx(29); self.pos14 = true; self.pos15 = false; end; if self.currentPosDir == -1 and self.pos13 == true then self:setcurrentPuntaDx(25); self.pos14 = true; self.pos13 = false; end; end;
		if self.currentPuntaDx == 30 then if self.currentPosDir == 1 and self.pos16 == true then self:setcurrentPuntaDx(31); self.pos15 = true; self.pos16 = false; end; if self.currentPosDir == -1 and self.pos14 == true then self:setcurrentPuntaDx(27); self.pos15 = true; self.pos14 = false; end; end;
		if self.currentPuntaDx == 32 then if self.currentPosDir == 1 and self.pos17 == true then self:setcurrentPuntaDx(33); self.pos16 = true; self.pos17 = false; end; if self.currentPosDir == -1 and self.pos15 == true then self:setcurrentPuntaDx(29); self.pos16 = true; self.pos15 = false; end; end;
		if self.currentPuntaDx == 34 then if self.currentPosDir == 1 and self.pos18 == true then self:setcurrentPuntaDx(35); self.pos17 = true; self.pos18 = false; end; if self.currentPosDir == -1 and self.pos16 == true then self:setcurrentPuntaDx(31); self.pos17 = true; self.pos16 = false; end; end;
		if self.currentPuntaDx == 36 then if self.currentPosDir == 1 and self.pos19 == true then self:setcurrentPuntaDx(37); self.pos18 = true; self.pos19 = false; end; if self.currentPosDir == -1 and self.pos17 == true then self:setcurrentPuntaDx(33); self.pos18 = true; self.pos17 = false; end; end;
		if self.currentPuntaDx == 38 then if self.currentPosDir == 1 and self.pos20 == true then self:setcurrentPuntaDx(39); self.pos19 = true; self.pos20 = false; end; if self.currentPosDir == -1 and self.pos18 == true then self:setcurrentPuntaDx(35); self.pos19 = true; self.pos18 = false; end; end;
		if self.currentPuntaDx == 40 then if self.currentPosDir == 1 and self.pos21 == true then self:setcurrentPuntaDx(41); self.pos20 = true; self.pos21 = false; end; if self.currentPosDir == -1 and self.pos19 == true then self:setcurrentPuntaDx(37); self.pos20 = true; self.pos19 = false; end; end;
		if self.currentPuntaDx == 42 then if self.currentPosDir == 1 and self.pos22 == true then self:setcurrentPuntaDx(43); self.pos21 = true; self.pos22 = false; end; if self.currentPosDir == -1 and self.pos20 == true then self:setcurrentPuntaDx(39); self.pos21 = true; self.pos20 = false; end; end;
		if self.currentPuntaDx == 44 then if self.currentPosDir == 1 and self.pos23 == true then self:setcurrentPuntaDx(45); self.pos22 = true; self.pos23 = false; end; if self.currentPosDir == -1 and self.pos21 == true then self:setcurrentPuntaDx(41); self.pos22 = true; self.pos21 = false; end; end;
		if self.currentPuntaDx == 46 then if self.currentPosDir == 1 and self.pos24 == true then self:setcurrentPuntaDx(47); self.pos23 = true; self.pos24 = false; end; if self.currentPosDir == -1 and self.pos22 == true then self:setcurrentPuntaDx(43); self.pos23 = true; self.pos22 = false; end; end;
		if self.currentPuntaDx == 48 then                                                                                                                                if self.currentPosDir == -1 and self.pos23 == true then self:setcurrentPuntaDx(45); self.pos24 = true; self.pos23 = false; end; end;
	end; self.currentPosDir = 0; end;
	if self.currentPuntePallet == 7 then
		if self.currentPuntaSx ==  2 then if self.currentPosDir == 1 and self.pos02 == true then self:setcurrentPuntaSx(3); self.pos01 = true; self.pos02 = false; end; end;
		if self.currentPuntaSx ==  4 then if self.currentPosDir == 1 and self.pos03 == true then self:setcurrentPuntaSx(5); self.pos02 = true; self.pos03 = false; end; if self.currentPosDir == -1 and self.pos01 == true then self:setcurrentPuntaSx(1); self.pos02 = true; self.pos01 = false; end; end;
		if self.currentPuntaSx ==  6 then if self.currentPosDir == 1 and self.pos04 == true then self:setcurrentPuntaSx(7); self.pos03 = true; self.pos04 = false; end; if self.currentPosDir == -1 and self.pos02 == true then self:setcurrentPuntaSx(3); self.pos03 = true; self.pos02 = false; end; end;
		if self.currentPuntaSx ==  8 then if self.currentPosDir == 1 and self.pos05 == true then self:setcurrentPuntaSx(9); self.pos04 = true; self.pos05 = false; end; if self.currentPosDir == -1 and self.pos03 == true then self:setcurrentPuntaSx(5); self.pos04 = true; self.pos03 = false; end; end;
		if self.currentPuntaSx == 10 then if self.currentPosDir == 1 and self.pos06 == true then self:setcurrentPuntaSx(11); self.pos05 = true; self.pos06 = false; end; if self.currentPosDir == -1 and self.pos04 == true then self:setcurrentPuntaSx(7); self.pos05 = true; self.pos04 = false; end; end;
		if self.currentPuntaSx == 12 then if self.currentPosDir == 1 and self.pos07 == true then self:setcurrentPuntaSx(13); self.pos06 = true; self.pos07 = false; end; if self.currentPosDir == -1 and self.pos05 == true then self:setcurrentPuntaSx(9); self.pos06 = true; self.pos05 = false; end; end;
		if self.currentPuntaSx == 14 then if self.currentPosDir == 1 and self.pos08 == true then self:setcurrentPuntaSx(15); self.pos07 = true; self.pos08 = false; end; if self.currentPosDir == -1 and self.pos06 == true then self:setcurrentPuntaSx(11); self.pos07 = true; self.pos06 = false; end; end;
		if self.currentPuntaSx == 16 then if self.currentPosDir == 1 and self.pos09 == true then self:setcurrentPuntaSx(17); self.pos08 = true; self.pos09 = false; end; if self.currentPosDir == -1 and self.pos07 == true then self:setcurrentPuntaSx(13); self.pos08 = true; self.pos07 = false; end; end;
		if self.currentPuntaSx == 18 then if self.currentPosDir == 1 and self.pos10 == true then self:setcurrentPuntaSx(19); self.pos09 = true; self.pos10 = false; end; if self.currentPosDir == -1 and self.pos08 == true then self:setcurrentPuntaSx(15); self.pos09 = true; self.pos08 = false; end; end;
		if self.currentPuntaSx == 20 then if self.currentPosDir == 1 and self.pos11 == true then self:setcurrentPuntaSx(21); self.pos10 = true; self.pos11 = false; end; if self.currentPosDir == -1 and self.pos09 == true then self:setcurrentPuntaSx(17); self.pos10 = true; self.pos09 = false; end; end;
		if self.currentPuntaSx == 22 then if self.currentPosDir == 1 and self.pos12 == true then self:setcurrentPuntaSx(23); self.pos11 = true; self.pos12 = false; end; if self.currentPosDir == -1 and self.pos10 == true then self:setcurrentPuntaSx(19); self.pos11 = true; self.pos10 = false; end; end;
		if self.currentPuntaSx == 24 then                                                                                                                                if self.currentPosDir == -1 and self.pos11 == true then self:setcurrentPuntaSx(21); self.pos12 = true; self.pos11 = false; end; end;
	if self.positions > 12 then 
		if self.currentPuntaSx == 24 then if self.currentPosDir == 1 and self.pos13 == true then self:setcurrentPuntaSx(25); self.pos12 = true; self.pos13 = false; end; end;
		if self.currentPuntaSx == 26 then if self.currentPosDir == 1 and self.pos14 == true then self:setcurrentPuntaSx(27); self.pos13 = true; self.pos14 = false; end; if self.currentPosDir == -1 and self.pos12 == true then self:setcurrentPuntaSx(23); self.pos13 = true; self.pos12 = false; end; end;
		if self.currentPuntaSx == 28 then if self.currentPosDir == 1 and self.pos15 == true then self:setcurrentPuntaSx(29); self.pos14 = true; self.pos15 = false; end; if self.currentPosDir == -1 and self.pos13 == true then self:setcurrentPuntaSx(25); self.pos14 = true; self.pos13 = false; end; end;
		if self.currentPuntaSx == 30 then if self.currentPosDir == 1 and self.pos16 == true then self:setcurrentPuntaSx(31); self.pos15 = true; self.pos16 = false; end; if self.currentPosDir == -1 and self.pos14 == true then self:setcurrentPuntaSx(27); self.pos15 = true; self.pos14 = false; end; end;
		if self.currentPuntaSx == 32 then if self.currentPosDir == 1 and self.pos17 == true then self:setcurrentPuntaSx(33); self.pos16 = true; self.pos17 = false; end; if self.currentPosDir == -1 and self.pos15 == true then self:setcurrentPuntaSx(29); self.pos16 = true; self.pos15 = false; end; end;
		if self.currentPuntaSx == 34 then if self.currentPosDir == 1 and self.pos18 == true then self:setcurrentPuntaSx(35); self.pos17 = true; self.pos18 = false; end; if self.currentPosDir == -1 and self.pos16 == true then self:setcurrentPuntaSx(31); self.pos17 = true; self.pos16 = false; end; end;
		if self.currentPuntaSx == 36 then if self.currentPosDir == 1 and self.pos19 == true then self:setcurrentPuntaSx(37); self.pos18 = true; self.pos19 = false; end; if self.currentPosDir == -1 and self.pos17 == true then self:setcurrentPuntaSx(33); self.pos18 = true; self.pos17 = false; end; end;
		if self.currentPuntaSx == 38 then if self.currentPosDir == 1 and self.pos20 == true then self:setcurrentPuntaSx(39); self.pos19 = true; self.pos20 = false; end; if self.currentPosDir == -1 and self.pos18 == true then self:setcurrentPuntaSx(35); self.pos19 = true; self.pos18 = false; end; end;
		if self.currentPuntaSx == 40 then if self.currentPosDir == 1 and self.pos21 == true then self:setcurrentPuntaSx(41); self.pos20 = true; self.pos21 = false; end; if self.currentPosDir == -1 and self.pos19 == true then self:setcurrentPuntaSx(37); self.pos20 = true; self.pos19 = false; end; end;
		if self.currentPuntaSx == 42 then if self.currentPosDir == 1 and self.pos22 == true then self:setcurrentPuntaSx(43); self.pos21 = true; self.pos22 = false; end; if self.currentPosDir == -1 and self.pos20 == true then self:setcurrentPuntaSx(39); self.pos21 = true; self.pos20 = false; end; end;
		if self.currentPuntaSx == 44 then if self.currentPosDir == 1 and self.pos23 == true then self:setcurrentPuntaSx(45); self.pos22 = true; self.pos23 = false; end; if self.currentPosDir == -1 and self.pos21 == true then self:setcurrentPuntaSx(41); self.pos22 = true; self.pos21 = false; end; end;
		if self.currentPuntaSx == 46 then if self.currentPosDir == 1 and self.pos24 == true then self:setcurrentPuntaSx(47); self.pos23 = true; self.pos24 = false; end; if self.currentPosDir == -1 and self.pos22 == true then self:setcurrentPuntaSx(43); self.pos23 = true; self.pos22 = false; end; end;
		if self.currentPuntaSx == 48 then                                                                                                                                if self.currentPosDir == -1 and self.pos23 == true then self:setcurrentPuntaSx(45); self.pos24 = true; self.pos23 = false; end; end;
	end; self.currentPosDir = 0; end;
	if self.currentPuntaDx == 1 or self.currentPuntaDx == 3 or self.currentPuntaDx == 5 or self.currentPuntaDx == 7 or self.currentPuntaDx == 9 or self.currentPuntaDx == 11 or self.currentPuntaDx == 13 or self.currentPuntaDx == 15 or self.currentPuntaDx == 17 or self.currentPuntaDx == 19 or self.currentPuntaDx == 21 or self.currentPuntaDx == 23 
	or self.currentPuntaDx == 25 or self.currentPuntaDx == 27 or self.currentPuntaDx == 29 or self.currentPuntaDx == 31 or self.currentPuntaDx == 33 or self.currentPuntaDx == 35 or self.currentPuntaDx == 37 or self.currentPuntaDx == 39 or self.currentPuntaDx == 41 or self.currentPuntaDx == 43 or self.currentPuntaDx == 45 or self.currentPuntaDx == 47 
	then self.currentPuntaDx = self.currentPuntaDx + 1; setTranslation(self.punteDx, self.currentPuntaDx/2*self.dist-self.distC, 0, 0); end;
	if self.currentPuntaSx == 1 or self.currentPuntaSx == 3 or self.currentPuntaSx == 5 or self.currentPuntaSx == 7 or self.currentPuntaSx == 9 or self.currentPuntaSx == 11 or self.currentPuntaSx == 13 or self.currentPuntaSx == 15 or self.currentPuntaSx == 17 or self.currentPuntaSx == 19 or self.currentPuntaSx == 21 or self.currentPuntaSx == 23 
	or self.currentPuntaSx == 25 or self.currentPuntaSx == 27 or self.currentPuntaSx == 29 or self.currentPuntaSx == 31 or self.currentPuntaSx == 33 or self.currentPuntaSx == 35 or self.currentPuntaSx == 37 or self.currentPuntaSx == 39 or self.currentPuntaSx == 41 or self.currentPuntaSx == 43 or self.currentPuntaSx == 45 or self.currentPuntaSx == 47
	then self.currentPuntaSx = self.currentPuntaSx + 1; setTranslation(self.punteSx, self.currentPuntaSx/2*self.dist-self.distC, 0, 0); end;
	if self.currentPuntePallet == 3 then setTranslation(self.fermiDx, self.currentPuntaDx/2*self.dist-self.distC, 0.785, 0.084); end;
	if self.currentPuntePallet == 7 then setTranslation(self.fermiSx, self.currentPuntaSx/2*self.dist-self.distC, 0.785, 0.084); end; end;
function variablePuntePallet:onAttach(attacherVehicle, jointDescIndex) end;
function variablePuntePallet:onDetach() self.speedViolationTimerPunte = self.speedViolationMaxTimePunte; end;
function variablePuntePallet:draw() end;
setcurrentPuntePalletEvent = {}; setcurrentPuntePalletEvent_mt = Class(setcurrentPuntePalletEvent, Event); InitEventClass(setcurrentPuntePalletEvent, "setcurrentPuntePalletEvent");
function setcurrentPuntePalletEvent:emptyNew() local self = Event:new(setcurrentPuntePalletEvent_mt); self.className="setcurrentPuntePalletEvent"; return self; end;
function setcurrentPuntePalletEvent:new(vehicle, currentPuntePallet) local self = setcurrentPuntePalletEvent:emptyNew() self.vehicle = vehicle; self.currentPuntePallet = currentPuntePallet; return self; end;
function setcurrentPuntePalletEvent:readStream(streamId, connection) local id = streamReadInt32(streamId); self.vehicle = networkGetObject(id); self.currentPuntePallet = streamReadInt8(streamId); self.vehicle:setcurrentPuntePallet(self.currentPuntePallet, true);
	if not connection:getIsServer() then g_server:broadcastEvent(setcurrentPuntePalletEvent:new(self.vehicle, self.currentPuntePallet), nil, connection, self.vehicle); end; end;
function setcurrentPuntePalletEvent:writeStream(streamId, connection) streamWriteInt32(streamId, networkGetObjectId(self.vehicle)); streamWriteInt8(streamId, self.currentPuntePallet); end;
function setcurrentPuntePalletEvent.sendEvent(vehicle, currentPuntePallet, noEventSend)	if noEventSend == nil or noEventSend == false then
	if g_server ~= nil then	g_server:broadcastEvent(setcurrentPuntePalletEvent:new(vehicle, currentPuntePallet), nil, nil, vehicle);
	else g_client:getServerConnection():sendEvent(setcurrentPuntePalletEvent:new(vehicle, currentPuntePallet)); end; end; end;
setcurrentPosDirEvent = {}; setcurrentPosDirEvent_mt = Class(setcurrentPosDirEvent, Event); InitEventClass(setcurrentPosDirEvent, "setcurrentPosDirEvent");
function setcurrentPosDirEvent:emptyNew() local self = Event:new(setcurrentPosDirEvent_mt); self.className="setcurrentPosDirEvent"; return self; end;
function setcurrentPosDirEvent:new(vehicle, currentPosDir) local self = setcurrentPosDirEvent:emptyNew() self.vehicle = vehicle; self.currentPosDir = currentPosDir; return self; end;
function setcurrentPosDirEvent:readStream(streamId, connection) local id = streamReadInt32(streamId); self.vehicle = networkGetObject(id); self.currentPosDir = streamReadInt8(streamId); if self.vehicle ~= nil then self.vehicle:setcurrentPosDir(self.currentPosDir, true); end;
	if not connection:getIsServer() then g_server:broadcastEvent(setcurrentPosDirEvent:new(self.vehicle, self.currentPosDir), nil, connection, self.vehicle); end; end;
function setcurrentPosDirEvent:writeStream(streamId, connection) streamWriteInt32(streamId, networkGetObjectId(self.vehicle)); streamWriteInt8(streamId, self.currentPosDir); end;
function setcurrentPosDirEvent.sendEvent(vehicle, currentPosDir, noEventSend)	if noEventSend == nil or noEventSend == false then
	if g_server ~= nil then	g_server:broadcastEvent(setcurrentPosDirEvent:new(vehicle, currentPosDir), nil, nil, vehicle);
	else g_client:getServerConnection():sendEvent(setcurrentPosDirEvent:new(vehicle, currentPosDir)); end; end; end;
setcurrentPuntaDxEvent = {}; setcurrentPuntaDxEvent_mt = Class(setcurrentPuntaDxEvent, Event); InitEventClass(setcurrentPuntaDxEvent, "setcurrentPuntaDxEvent");
function setcurrentPuntaDxEvent:emptyNew() local self = Event:new(setcurrentPuntaDxEvent_mt); self.className="setcurrentPuntaDxEvent"; return self; end;
function setcurrentPuntaDxEvent:new(vehicle, currentPuntaDx) local self = setcurrentPuntaDxEvent:emptyNew() self.vehicle = vehicle; self.currentPuntaDx = currentPuntaDx; return self; end;
function setcurrentPuntaDxEvent:readStream(streamId, connection) local id = streamReadInt32(streamId); self.vehicle = networkGetObject(id); self.currentPuntaDx = streamReadInt8(streamId); if self.vehicle ~= nil then self.vehicle:setcurrentPuntaDx(self.currentPuntaDx, true); end;
	if not connection:getIsServer() then g_server:broadcastEvent(setcurrentPuntaDxEvent:new(self.vehicle, self.currentPuntaDx), nil, connection, self.vehicle); end; end;
function setcurrentPuntaDxEvent:writeStream(streamId, connection) streamWriteInt32(streamId, networkGetObjectId(self.vehicle)); streamWriteInt8(streamId, self.currentPuntaDx); end;
function setcurrentPuntaDxEvent.sendEvent(vehicle, currentPuntaDx, noEventSend)	if noEventSend == nil or noEventSend == false then
	if g_server ~= nil then	g_server:broadcastEvent(setcurrentPuntaDxEvent:new(vehicle, currentPuntaDx), nil, nil, vehicle);
	else g_client:getServerConnection():sendEvent(setcurrentPuntaDxEvent:new(vehicle, currentPuntaDx)); end; end; end;
setcurrentPuntaSxEvent = {}; setcurrentPuntaSxEvent_mt = Class(setcurrentPuntaSxEvent, Event); InitEventClass(setcurrentPuntaSxEvent, "setcurrentPuntaSxEvent");
function setcurrentPuntaSxEvent:emptyNew() local self = Event:new(setcurrentPuntaSxEvent_mt); self.className="setcurrentPuntaSxEvent"; return self; end;
function setcurrentPuntaSxEvent:new(vehicle, currentPuntaSx) local self = setcurrentPuntaSxEvent:emptyNew() self.vehicle = vehicle; self.currentPuntaSx = currentPuntaSx; return self; end;
function setcurrentPuntaSxEvent:readStream(streamId, connection) local id = streamReadInt32(streamId); self.vehicle = networkGetObject(id); self.currentPuntaSx = streamReadInt8(streamId); if self.vehicle ~= nil then self.vehicle:setcurrentPuntaSx(self.currentPuntaSx, true); end;
	if not connection:getIsServer() then g_server:broadcastEvent(setcurrentPuntaSxEvent:new(self.vehicle, self.currentPuntaSx), nil, connection, self.vehicle); end; end;
function setcurrentPuntaSxEvent:writeStream(streamId, connection) streamWriteInt32(streamId, networkGetObjectId(self.vehicle)); streamWriteInt8(streamId, self.currentPuntaSx); end;
function setcurrentPuntaSxEvent.sendEvent(vehicle, currentPuntaSx, noEventSend)	if noEventSend == nil or noEventSend == false then
	if g_server ~= nil then	g_server:broadcastEvent(setcurrentPuntaSxEvent:new(vehicle, currentPuntaSx), nil, nil, vehicle);
	else g_client:getServerConnection():sendEvent(setcurrentPuntaSxEvent:new(vehicle, currentPuntaSx)); end; end; end;