Small optimization for calculating _allow_punch

This commit is contained in:
teknomunk 2024-09-09 10:08:44 -05:00
parent dfb909e6bf
commit 5564610b09
1 changed files with 1 additions and 3 deletions

View File

@ -297,9 +297,7 @@ local arrow_entity = {
end end
local pos = self.object:get_pos() local pos = self.object:get_pos()
if not self._startpos or pos and vector.distance(self._startpos, pos) > 1.5 then self._allow_punch = self._allow_punch or not self._startpos or pos and vector.distance(self._startpos, pos) > 1.5
self._allow_punch = true
end
if self._stuck then if self._stuck then
return stuck_arrow_on_step(self, dtime) return stuck_arrow_on_step(self, dtime)