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