#75 Please add an optional crosshair

open
nobody
None
5
2013-07-04
2012-11-16
Fabian Greffrath
No

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

Discussion

  • Andrey Budko
    Andrey Budko
    2012-11-16

    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

     
    Attachments
  • crosshair "angle" PPM graphic

     
    Attachments
  • crosshair "dot" PPM graphic

     
    Attachments
  • Andrey Budko
    Andrey Budko
    2013-06-28

    Nice patch! Applied. Thanks!

     
  • Andrey Budko
    Andrey Budko
    2013-06-28

    • status: open --> closed-fixed
    • Group: --> Next Release (example)
     
  • Andrey Budko
    Andrey Budko
    2013-06-28

    • status: closed-fixed --> open
     
  • Blondie
    Blondie
    2013-06-28

    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.

     
  • Andrey Budko
    Andrey Budko
    2013-06-29

    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?
    done

     
  • Blondie
    Blondie
    2013-06-29

    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)
      {
      - if (P_AimLineAttack(plr->mo, plr->mo->angle, 1664FRACUNIT, 0))
      + if (P_AimLineAttack(plr->mo, plr->mo->angle, 1664FRACUNIT, 0) && !(linetarget->flags & MF_SHADOW))
      {
      crosshair.target_x = linetarget->x;
      crosshair.target_y = linetarget->y;