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
|
||||
events:vore(new_events)
|
||||
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)
|
||||
end
|
||||
|
||||
@ -261,6 +261,7 @@ function updategame()
|
||||
end
|
||||
|
||||
pbullets:strip(function(pb)
|
||||
if (pb:move()) return true
|
||||
for es in eship_collider:iterate_collisions(hurtbox(pb)) do
|
||||
if (es:hitbullet(pb)) eship_collider:yoink(es)
|
||||
if (pb:hitship(es)) return true
|
||||
|
Reference in New Issue
Block a user