The occlusion path was reusing the underwater lowpass filter which
has an aggressive AL_LOWPASS_GAINHF (0.25) that strips the high
frequency cues HRTF relies on for spatial positioning.
Introduce a separate occlusion filter with distance-scaled high
frequency attenuation, preserving enough HF content for accurate
3D audio.
Ref yquake2/yquake2#973
The code used the index value written in the save file without bounds checking, so an item index of -2 or 334 for example would lead to illegal memory access or undefined behavior
The menu defined 9, the backend which pings server 16. Reduce the
backend to 9, because adding more entries to the menu would need
some refactoring to still fit into 320x280.
Closes#1287.
Lasers don't have an `oldorigin` which breaks lerping and leads to
stuttering. Fix this by interpolating the origin.
Submitted by @BjossiAlfreds in #1286.
Add a NULL pointer guard in Z_Free to avoid undefined behavior from
pointer arithmetic on NULL. Invalidate the magic value before free()
to help detect double-free bugs. Use calloc instead of malloc+memset
in Z_TagMalloc for potentially more efficient zeroing.
The Unix network code logs getaddrinfo failures via
Com_Printf and gai_strerror, but the Windows side
silently returned 0. Add the same error logging to
match the Unix behaviour.
Crosshair color tinting works by multiplying the texture pixel colors
by the chosen tint. This only produces the correct hue when the source
pixels are white. The standard crosshair PCX images use non-white
palette entries, causing incorrect or dim colors for dot and angle
types.
GL1/GL3: normalize crosshair pixels to the brightest palette index at
load time so the existing multiply-based tinting works correctly.
Soft: compute per-pixel luminance and apply tint at that brightness
instead of multiplying per-channel, stripping the original hue.
DrawPicScaledCol was added to refexport_t. Old renderer .so files
compiled against API_VERSION 7 would have an ABI mismatch, potentially
leaving the new field as garbage rather than NULL. Bumping the version
ensures old renderers are cleanly rejected at load time.
Replace the O(255) FindNearestColor brute-force palette search with the
existing d_16to8table (RGB565-to-palette) lookup table, reducing
per-pixel cost to O(1). Expose d_16to8table in local.h so sw_draw.c
can access it.
The if/else for TEXNUM_SCRAPS was only needed for GL buffer batching,
which RDraw_PicScaledCol does not use. Just call R_Bind(gl->texnum)
directly.
Suggested-by: protocultor