Lower selfhit time to 0.5

This commit is contained in:
Elias Åström 2023-08-25 19:23:35 +02:00 committed by cora
parent 9b89d2b3ac
commit eab163d334

View File

@ -228,7 +228,7 @@ function ARROW_ENTITY.on_step(self, dtime)
local obj = closest_object
local is_player = obj:is_player()
local lua = obj:get_luaentity()
if obj == self._shooter and self._lifetime > 1.02 or obj ~= self._shooter and (is_player or (lua and (lua.is_mob or lua._hittable_by_projectile))) then
if obj == self._shooter and self._lifetime > 0.5 or obj ~= self._shooter and (is_player or (lua and (lua.is_mob or lua._hittable_by_projectile))) then
if obj:get_hp() > 0 then
-- Check if there is no solid node between arrow and object
local ray = minetest.raycast(self.object:get_pos(), obj:get_pos(), true)