]> git.lizzy.rs Git - dragonblocks_alpha.git/commit
Use Binary trees for MapSector and MapBlock sorting
authorElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 12 Jul 2021 08:43:58 +0000 (10:43 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 12 Jul 2021 08:43:58 +0000 (10:43 +0200)
commite5e092d888029ec3eddc0db751780318d5503bd9
treecf89cba32e97b443ae564d5c7843f9ec82352d74
parent053d68dbcd47911b6568dfcb777de21d27bbadce
Use Binary trees for MapSector and MapBlock sorting
This fixes various issues with the map (since the binsearch algorithm was broken), like flickering of blocks and the issue with colliding inside loaded blocks because the binsearch function didn't return the block properly.
It also speeds up the insertion of new blocks and sectors by a lot.
src/Makefile
src/array.c
src/array.h
src/bintree.c [new file with mode: 0644]
src/bintree.h [new file with mode: 0644]
src/map.c
src/map.h
src/server.c
src/servermap.c
src/servermap.h