]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
PVS: dynamically allocate all FatPVS buffers
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 7 May 2024 01:23:16 +0000 (11:23 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 9 May 2024 03:07:37 +0000 (13:07 +1000)
commit541436b5a8750272755940c7b5c5c3bb469043a8
tree73305cc980fa902915eecddeb62747ce6e8c5f2a
parentf0a957db22c90c82817674c1cf3c53976e44fa87
PVS: dynamically allocate all FatPVS buffers

Some were dynamic, others weren't...

Fixes invisible entities and monsters ignoring the player on big/complex
maps, and undefined behaviour (reading past the end of the buffer).
Fixes https://gitlab.com/xonotic/darkplaces/-/issues/322

Adds Mem_Size() for retrieving the size of an allocation.

Simplifies some checks (we can check the pointer now so we dont need to
store byte counts just to see if there's any data).

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
14 files changed:
clvm_cmds.c
gl_rmain.c
gl_rsurf.c
model_brush.c
model_brush.h
model_shared.c
qdefs.h
render.h
server.h
snd_main.c
sv_ents.c
sv_send.c
svvm_cmds.c
zone.h