Skip to content

Commit 3638d52

Browse files
committed
fix projectiles not dying sometimes
1 parent 65b12ba commit 3638d52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quant.ew/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ function OnProjectileFired(shooter_id, projectile_id, initial_rng, position_x, p
237237
local proj = EntityGetFirstComponentIncludingDisabled(projectile_id, "ProjectileComponent")
238238
if proj ~= nil then
239239
local life = ComponentGetValue2(proj, "lifetime")
240-
if life > 4 then
241-
ComponentSetValue2(proj, "lifetime", 9999999)
240+
if life > 0 then
241+
ComponentSetValue2(proj, "lifetime", life * ctx.my_player.fps / shooter_player_data.fps)
242242
end
243243
end
244244
end

0 commit comments

Comments
 (0)