Please add an optional crosshair
Brought to you by:
e6y
Hello,
seriously, the only feature that I miss in prboom+ is a crosshair that can get switched on and off. I am not talking about dozens of variants, just a little cross in the middle of the screen that suggests where my ammo will land when using mouse look.
Thanks for considering!
- Fabian
prboom-plus does not change original doom physics, hence mouse look has no effect on shooting direction
Alright, that's good to know. But anyway, an unobtrusive crosshair would be really need and help at least with vertical aiming. ;)
s/need/neat/ in my previous post, sorry!
> prboom-plus does not change original doom physics, hence mouse look has no
> effect on shooting direction
Ideally the crosshair would indicate where auto-aim would place the shot.
Please find attached a patch to add a crosshair to prboom-plus. Three different crosshair graphics are for choice: cross, angle and dot. Extra features are changing crosshair colors according to the player's health and/or on sight of a target.
I would have loved to add the following features, but I will need help with them. Especially because they interfere with the current effort to bring mouselook into the software renderer:
1) Compensate for mouselook, i.e. keep the crosshair pointing in the horizontal direction regardless of the current angle of view
2) Lock the crosshair on the center of a target sprite as long as it would get hit
If there is interest in these advanced features, I will need some help! cough ;)
crosshair "cross" PPM graphic
crosshair "angle" PPM graphic
crosshair "dot" PPM graphic
Nice patch! Applied. Thanks!
Great feature, guys! This and software mode mlook have officially converted me to mouselook.
However, would it be possible to add a menu option to customize the color of the crosshair when it is/isn't on a target? Something like "crosshair color" and "target crosshair color" would be fine.
Thanks again, Andrey! You're the best.
The "lock on target" feature is awesome, by the way. :)
The crosshair hilight and lock features should probably get disabled if the enemy is a spectre. It pretty much their purpose not to be easily seen.
Like this:
--- a/src/hu_stuff.c
+++ b/src/hu_stuff.c
@@ -2157,7 +2157,7 @@ void HU_draw_crosshair(void)
if (hudadd_crosshair_target || hudadd_crosshair_lock_target)
{
{
crosshair.target_x = linetarget->x;
crosshair.target_y = linetarget->y;