pyrollo / display_modpack

Display modpack for Minetest, provides mods with dynamic display and font display : clocks, signs, and more.
GNU Lesser General Public License v3.0
25 stars 27 forks source link

Allow a greater object offset #15

Closed Thomas--S closed 6 years ago

Thomas--S commented 6 years ago

This allows e.g. polemounted signs. Required for display_modpack to be usable in the streets mod. Backwards compatible.

Thomas--S commented 6 years ago

For a possible use case please see minetest-streets/streets#98.

Thomas--S commented 6 years ago

PR updated to fix problems at mapblock borders. Should be ready for merge now.

pyrollo commented 6 years ago

Nice PR ! I'll test it this week end

pyrollo commented 6 years ago

Hi Thomas,

I did a simple test with your version and I had some troubles. It seems to work on a new world but on an already exiting world with signs there's a problem.

Here is how to easily get that problem:

Sign does not display text anymore and, when exiting minetest, there are lots of "Trying to store id = XXXX statically but block (X,Y,Z) already contains 64 objects. Forcing delete." messages.

I added a print just before add_entity at line 134 of display_api/init.lua and saw that hundred of entities are being added for a single sing.

I have to get more into your code to understand what happens.

Thomas--S commented 6 years ago

Thanks for finding this problem!

It seems like I introduced this bug after testing backwards compatibility while doing little improvements. The problem is fixed now.

.

display_api/init.lua Line 87:

return vector.equals(real_pos, vector.round(pos))

The vector.round in this line was missing.

Thomas--S commented 6 years ago

Thank you very much for merging this!