1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-21 03:55:21 +02:00
Files
luanti/src
Paramat 922e6ff57e blitToVManip: Check out-of-bounds using node position not index (#8127)
Previously, when using 'place on vmanip' to add a schematic to a
lua voxelmanip, if part of the schematic was outside the voxelmanip
volume, the outside part would often appear in a strange place
elsewhere inside the voxelmanip instead of being trimmed off.
This was due to the out-of-bounds check checking the index.

A position outside the voxelmanip can have an index that satisfies
'0 <= index <= voxelmanip volume', causing the node to be placed
at a strange position inside the voxelmanip.

Use 'vm->m_area.contains(pos)' instead.
Move index calculation to later in the code to optimise.
2019-01-25 19:01:00 +00:00
..
2019-01-06 17:21:04 +01:00
2017-08-17 22:19:39 +02:00
2018-04-19 20:14:53 +01:00
2017-09-26 20:30:14 +02:00
2019-01-16 13:39:13 +01:00
2017-08-30 08:09:41 +02:00
2018-03-30 18:32:52 +02:00
2017-08-18 07:44:52 +02:00
2018-04-19 20:14:53 +01:00
2017-08-17 22:19:39 +02:00
2018-11-18 11:48:16 +01:00
2017-08-17 22:19:39 +02:00
2018-07-21 03:09:39 -07:00
2018-12-22 17:36:24 +01:00
2017-08-19 11:29:46 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-09-26 20:30:14 +02:00
2018-04-19 20:14:53 +01:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00