Progress on mineleader.
This commit is contained in:
		@@ -373,14 +373,14 @@ local function moveTo(dest, range)
 | 
				
			|||||||
	end
 | 
						end
 | 
				
			||||||
	local xBlocked, yBlocked, zBlocked = false, false, false
 | 
						local xBlocked, yBlocked, zBlocked = false, false, false
 | 
				
			||||||
	local oldPos = nil
 | 
						local oldPos = nil
 | 
				
			||||||
	while oldPos == nil or not vectorEqual(dest, position) do
 | 
						while not vectorEqual(dest, position) do
 | 
				
			||||||
		if oldPos ~= nil and vectorEqual(oldPos, position) then
 | 
							if oldPos ~= nil and vectorEqual(oldPos, position) then
 | 
				
			||||||
			sendLog(FAILED, "Cannot proceed to due obstacle.")
 | 
								sendLog(FAILED, "Cannot proceed to due obstacle.")
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		oldPos = vector.new(position.x, position.y, position.z);
 | 
							oldPos = vector.new(position.x, position.y, position.z);
 | 
				
			||||||
		if position.x ~= dest.x then
 | 
							if position.x ~= dest.x then
 | 
				
			||||||
			if not orient(vector.new(dest.x - position.x, 0, 0), heading, rightAxis) then
 | 
								if not orient(vector.new(dest.x - position.x, 0, 0):normalize(), heading, rightAxis) then
 | 
				
			||||||
				sendLog(FAILED, "Unable to orient for X axis.")
 | 
									sendLog(FAILED, "Unable to orient for X axis.")
 | 
				
			||||||
				return
 | 
									return
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
@@ -394,7 +394,7 @@ local function moveTo(dest, range)
 | 
				
			|||||||
			end
 | 
								end
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
		if position.z ~= dest.z then
 | 
							if position.z ~= dest.z then
 | 
				
			||||||
			if not orient(vector.new(0, 0, dest.z - position.z), heading, rightAxis) then
 | 
								if not orient(vector.new(0, 0, dest.z - position.z):normalize(), heading, rightAxis) then
 | 
				
			||||||
				sendLog(FAILED, "Unable to orient for Z axis.")
 | 
									sendLog(FAILED, "Unable to orient for Z axis.")
 | 
				
			||||||
				return
 | 
									return
 | 
				
			||||||
			end
 | 
								end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user