Skip to content

Implement cl_gunoffset and casings-related fixes and refactoring

bones_was_here requested to merge bones_was_here/gunoffset into master

Implement cl_gunoffset: adjusts position of first person weapon viewmodel

Fixes first person viewmodel casings being drawn on spectating clients with r_drawviewmodel 0 set.

Fixes casing bitflag(s) being sent to clients other than the intended one(s).

Includes casing-related refactoring.

Implements #2017 (closed)

Some viewmodel_draw() optimisations

Check PVS before sending casings

...to players who don't own them and aren't spectating their owner

Save a byte on each casing message by omitting roll angle

Make bullet cases more bouncy than shell cases

Significantly reduce the spin applied to casings

Remove unused parameters of SpawnCasing()

Reduce overhead when deleting casings

Delete casings that spawn in a solid to avoid glitchy behaviour

This is cheaper on CPU time than doing it on the server since the client performs the trace anyway

Use model size for casing bbox

Fixes floating slightly off the ground or poking into solids horizontally

Increase cl_casings_ticrate for better quality with cl_casings_sloppy 0

Closes #2374 (closed)

Edited by bones_was_here

Merge request reports