Tweak settling check fix to be more cautious.
This commit is contained in:
parent
bb81d0c4d5
commit
0b2f3fce52
@ -9,10 +9,6 @@ ISSUES: Bugs, Cleanup and Refinements
|
||||
# # # # # # # # # # # #
|
||||
#### # #### # ###### ###### # # ####
|
||||
|
||||
- Ent settling check is too heavy-handed.
|
||||
- Should probably just check center, only apply X/Z offset
|
||||
if position is unchanged since last check.
|
||||
|
||||
- Chop frames, ladders, staves back down into sticks?
|
||||
|
||||
- Automation reliability issues
|
||||
|
@ -82,9 +82,13 @@ function nodecore.entity_settle_check(on_settle, isnode)
|
||||
return function(self)
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
local csize = self.collidesize or 0.5
|
||||
pos.x = pos.x + (math_random() * 2 - 1) * csize
|
||||
pos.z = pos.z + (math_random() * 2 - 1) * csize
|
||||
if self.settle_oldpos and vector.distance(self.settle_oldpos, pos) < 1/16 then
|
||||
local csize = self.collidesize or 0.5
|
||||
pos.x = pos.x + (math_random() * 2 - 1) * csize
|
||||
pos.z = pos.z + (math_random() * 2 - 1) * csize
|
||||
else
|
||||
self.settle_oldpos = pos
|
||||
end
|
||||
|
||||
local yvel = self.object:get_velocity().y
|
||||
local coll = (isnode or self.not_rising and yvel == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user