Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional replacement of short radar forward tick with dashed forward line #247

Open
wants to merge 2 commits into
base: 2.4
Choose a base branch
from

Conversation

Paula90
Copy link

@Paula90 Paula90 commented Apr 10, 2020

  • Draw a dashed line in radar in tank heading direction instead of small tick at radar border
  • Add GUI menu entry "Radar Forward Marker:" Tick/Line

... a big aiming aid for me ;-)

@The-Noah
Copy link
Contributor

It would be nice to have a screenshot so we can see what it looks like without having to download and compile it.

@Paula90
Copy link
Author

Paula90 commented Apr 10, 2020

Sorry, my first contribution at all ... a little unexperienced ;-)

bzflag_radar_line

@The-Noah
Copy link
Contributor

That's okay, I'm still new too :)
It might be just me but it looks slightly off-centered.

image

@Paula90
Copy link
Author

Paula90 commented Apr 10, 2020

You're right, but isn't this natural? Given the center "square" (myTank) has an even pixel size, the dashed line cannot be exactly centered to this.
From the code, it's just a longer version of the existing tick ;-)

@The-Noah
Copy link
Contributor

Ah that's right 🙂

@allejo allejo requested a review from blast007 April 13, 2020 18:25
@allejo
Copy link
Member

allejo commented Apr 13, 2020

Hmm... I'm not sure how I feel about this. For one, I would think this should be in a proto-break if this gets merged in; this feels like it's giving players with the most up to date client an unfair advantage in aiming. And on that note, I have my concerns that because it's providing aim assistance, that it'd be classified more like a cheat than a feature.

@blast007
Copy link
Member

There was a patch like this accepted into the 2.1 development branch back in 2006, except that it was a solid line instead of a dashed line. At a quick glance, I think this PR implements the drawing code better than the patch from 2006, but I'll have to take a closer look at it later.

However, I would also agree with @allejo that this should be added with a new major release of the game instead of a 2.4 compatible version.

@macsforme
Copy link
Member

According to the spec, GL_LINE_STIPPLE doesn't appear to be a valid argument to glPushAttrib(). Am I missing something?

@Paula90
Copy link
Author

Paula90 commented Apr 14, 2020

According to the spec, GL_LINE_STIPPLE doesn't appear to be a valid argument to glPushAttrib(). Am I missing something?

You're right, should be GL_LINE_BIT or GL_ENABLE_BIT right? Not sure from the spec whether there's a semantic difference in this case between both arguments.

@macsforme
Copy link
Member

The spec is a little confusing to me with respect to the terms "enable bit" versus "flag," but I would include both to be safe (e.g., glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT)). I don't see any downsides to using that approach in your proposed patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants