pbullets also move just before the collision check.
This also sets up for the "fast shots" refactor.
This commit is contained in:
		| @@ -234,7 +234,7 @@ function updategame() | |||||||
|  end |  end | ||||||
|  events:vore(new_events) |  events:vore(new_events) | ||||||
|  events:strip(call_move) |  events:strip(call_move) | ||||||
|  for _, lst in ipairs{intangibles_bg, eships, pbullets} do |  for _, lst in ipairs{intangibles_bg, eships} do | ||||||
|   lst:strip(call_move) |   lst:strip(call_move) | ||||||
|  end |  end | ||||||
|  |  | ||||||
| @@ -261,6 +261,7 @@ function updategame() | |||||||
|  end |  end | ||||||
|  |  | ||||||
|  pbullets:strip(function(pb) |  pbullets:strip(function(pb) | ||||||
|  |   if (pb:move()) return true | ||||||
|   for es in eship_collider:iterate_collisions(hurtbox(pb)) do |   for es in eship_collider:iterate_collisions(hurtbox(pb)) do | ||||||
|    if (es:hitbullet(pb)) eship_collider:yoink(es) |    if (es:hitbullet(pb)) eship_collider:yoink(es) | ||||||
|    if (pb:hitship(es)) return true |    if (pb:hitship(es)) return true | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user