weird (numleafs+31)>>3 in SV_FatPVS
Posted: Wed Jul 26, 2017 3:58 am
This is a bug/typo, right?
https://github.com/id-Software/Quake/bl ... ain.c#L412
That gives the number of bytes for the bitvector, plus 3 bytes padding, which seems useless.
It should just be (numleafs+7)>>3 like all of the other PVS buffers?
There are some occurences of:
in Quakeworld, which is rounding up to the nearest 4 byte boundary, so possibly that's where the typo came from.
Code: Select all
fatbytes = (sv.worldmodel->numleafs+31)>>3;
That gives the number of bytes for the bitvector, plus 3 bytes padding, which seems useless.
It should just be (numleafs+7)>>3 like all of the other PVS buffers?
There are some occurences of:
Code: Select all
4*((sv.worldmodel->numleafs+31)>>5);