use constraints to make chasey chase; now it is not wiggly
This commit is contained in:
		| @@ -1016,10 +1016,9 @@ mknew(chasey, function(ship) | ||||
| end) | ||||
|  | ||||
| function chasey:act() | ||||
|  local dx = 0 | ||||
|  if (self.x < primary_ship.x) dx=self.thrust | ||||
|  if (self.x > primary_ship.x) dx=-self.thrust | ||||
|  return dx, 0, false, self.x - 16 < primary_ship.x and self.x + 16 > primary_ship.x | ||||
|  self.xmin = max(primary_ship.x-8, 0) | ||||
|  self.xmax = min(primary_ship.x + 8, 112 - 8*self.size) | ||||
|  return 0, 0, false, self.x - 16 < primary_ship.x and self.x + 16 > primary_ship.x | ||||
| end | ||||
|  | ||||
| xl_chasey=chasey.new{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user