-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Added DMG_LASTGENERICFLAG and DMG_HEADSHOT defines #924
Conversation
Do you've test that in CSGO? |
I can't test it in CSGO. |
So in CSGO is DMG_LASTGENERICFLAG = Headshot |
@@ -69,6 +69,8 @@ | |||
#define DMG_BLAST_SURFACE (1 << 27) /**< A blast on the surface of water that cannot harm things underwater */ | |||
#define DMG_DIRECT (1 << 28) | |||
#define DMG_BUCKSHOT (1 << 29) /**< not quite a bullet. Little, rounder, different. */ | |||
#define DMG_LASTGENERICFLAG (1 << 30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary to be included, it only exists as an base point for other definitions near the msb.
@@ -69,6 +69,8 @@ | |||
#define DMG_BLAST_SURFACE (1 << 27) /**< A blast on the surface of water that cannot harm things underwater */ | |||
#define DMG_DIRECT (1 << 28) | |||
#define DMG_BUCKSHOT (1 << 29) /**< not quite a bullet. Little, rounder, different. */ | |||
#define DMG_LASTGENERICFLAG (1 << 30) | |||
#define DMG_HEADSHOT (1 << 31) /**< Damage from a headshot. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably define what games do or don't support this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DMG_HEADSHOT
can be useful for some games, thanks for opening this pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DMG_LASTGENERICFLAG indeed does not seem useful. As @Headline noted, its use is for the programmers of the game itself to easier add new ones without stomping on the built-in types.
Ex.
#define DMG_BLAH (DMG_LASTGENERICFLAG+1)
#define DMG_BLAH2 (DMG_LASTGENERICFLAG+2)
Headshot is going to be game-specific (as hinted by it being greater than DMG_LASTGENERICFLAG
. I don't think it necessarily belongs in sdkhooks.inc, but if putting it there, I think doing something like DMG_CSGO_HEADSHOT
is more appropriate. Alternatively, it could go in cstrike.inc with a name like that.
closing this as it is stale, if you’d like to reopen this pull request please address required changes and reopen it once you’re ready thank you! |
According to https://developer.valvesoftware.com/wiki/Damage_types