TTT: draw weapon Help before crosshair #1251

Merged
merged 1 commit into from Oct 2, 2016

Projects

None yet

3 participants

@markusmarkusz
Contributor

If you disable the crosshair the help from a hud wouldn't get drawn.
This shouldn't be so because you disable the crosshair, not the help.

By the way why is the crosshair drawn in SWEP:DrawHUD()?
Wouldn't it be better if it is drawn in SWEP:DoDrawCrosshair()? Then developers can hide the crosshair for special equipments without overwriting the complete function.

@robotboy655 robotboy655 added the TTT label Oct 2, 2016
@svdm svdm merged commit 7f0764b into garrynewman:master Oct 2, 2016
@markusmarkusz
Contributor

@svdm
What about the thing that I mentioned?

By the way why is the crosshair drawn in SWEP:DrawHUD()?
Wouldn't it be better if it is drawn in SWEP:DoDrawCrosshair()? Then developers can hide the crosshair for special equipments without overwriting the complete function.

@svdm
Collaborator
svdm commented Oct 3, 2016

I don't remember why DoDrawCrosshair wasn't used, perhaps simply because the CS:S SWEPs I based things on didn't use it.

I'm not sure if it's practical to change it now. I think it would lead to custom TTT SWEPs getting double crosshairs if they've overridden DrawHUD to do their own crosshair.

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