anedumgottil / VR-Mazmorra

Procedurally generated VR Dungeon
Apache License 2.0
1 stars 0 forks source link

"setBlock() generated out of bounds range offset" #31

Closed apodgo2 closed 6 years ago

apodgo2 commented 6 years ago

MapGenerator is slightly unstable and creates calls to setBlock() that generate out of bounds range offsets for placing blocks in the GridSpace. This results in 80 warnings spammed to the debug log, seems to work regardless but it needs to be removed

apodgo2 commented 6 years ago

I'm really not sure if this was a problem to begin with. It makes sense that some gridobjects might have larger real world positions than the actual grid index they reside in, considering the grid coordinates are really only the bottom leftmost coordinate of the gridobject. Perhaps it could be a good check if we checked whether or not they were more than 1 entire gridspace off, and I'll be adding that functionality in a future commit but for now I have simply disabled this warning in commit ID 8506301ba04e3400e7365c8d3230588428203fef

apodgo2 commented 6 years ago

Just did some testing, it appears that the offset check was assuming that the map was going to be 20x20 when in reality it is 20x20*2 because of the actual grid size spacing. fixed in d34deb8c62881121af00c44342653d74599349ce