mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 08:31:08 +01:00
Small optimization for calculating _allow_punch
This commit is contained in:
parent
610042be71
commit
ec63fcd1bc
1 changed files with 1 additions and 3 deletions
|
@ -297,9 +297,7 @@ local arrow_entity = {
|
|||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
if not self._startpos or pos and vector.distance(self._startpos, pos) > 1.5 then
|
||||
self._allow_punch = true
|
||||
end
|
||||
self._allow_punch = self._allow_punch or not self._startpos or pos and vector.distance(self._startpos, pos) > 1.5
|
||||
|
||||
if self._stuck then
|
||||
return stuck_arrow_on_step(self, dtime)
|
||||
|
|
Loading…
Reference in a new issue