Skip to content

crosshair_offset

terencehill requested to merge terencehill/crosshair into master

Add new cvar crosshair_offset: "add an offset to crosshair position to align misaligned crosshair images. Warning: it may make the crosshair slightly more blurry. Try "-0.5 -0.5" with 1 pixel-wide crosshair images"

It fixes crosshairs like crosshair38.tga. To test it:

crosshair 38
crosshair_dot 1
crosshair_offset "-0.5 -0.5"
// revert with:
crosshair_offset "0 0"

I haven't implemented a more sophisticated feature such as adding a file next to each misaligned crosshair with offset values because changing the offset may make the crosshair slightly more blurry with 1 pixel-wide crosshair images when crosshair_size is < ~1.5 (menu allows changing crosshair_size from 0.1 to 1); for very low crosshair_size values crosshair becomes invisible. Basically it adds a new issue that may be considered worse than the bad alignment.

I tried to double the crosshair image and adjust the alignment in the image, making sure crosshair pixels are always at full alpha and I get the same effect, crosshair becomes more blurry.

Edited by Mario

Merge request reports