-
Notifications
You must be signed in to change notification settings - Fork 4
Draft: Bullet
The Bullet
enum contains bullet types used by the game.
It is primarily used by CBaseEntity
's FireBullets
method to determine which skill setting to use for damage, and which damage type(s) to use. It also affects material type effects.
Note that FireBullets
will draw decals for monster bullets, but not player bullets. This is because player bullets are normally handled by the game's client side prediction code, which will locally handle effects. Regardless of what value you pass for the draw argument, if the entity FireBullets
is called on is a player, it will never draw decals.
HTML documentation can be found here.
Skill Value | Damage types |
---|---|
None | DMG_CLUB |
No bullet. Always deals 50 melee damage, and creates impact decals on glass surfaces only.
Skill Value | Damage types |
---|---|
sk_plr_9mm_bullet | DMG_BULLET |
9mm bullet. The Glock/Beretta pistol uses this.
Skill Value | Damage types |
---|---|
sk_plr_9mmAR_bullet | DMG_BULLET |
MP5 bullet. The MP5 uses this.
Skill Value | Damage types |
---|---|
sk_556_bullet | DMG_BULLET |
5.56 NATO bullet. The M249 SAW and M16 use this.
Skill Value | Damage types |
---|---|
sk_plr_762_bullet | DMG_SNIPER |
7.62 NATO bullet. The sniper rifle uses this.
Skill Value | Damage types |
---|---|
sk_plr_357_bullet | DMG_BULLET |
.357 revolver bullet. The Python uses this.
Skill Value | Damage types |
---|---|
(sk_plr_357_bullet) / 3 * 2 | DMG_BULLET |
.357 revolver bullet. The Desert Eagle uses this. This is the same skill value, modified for the Eagle's speed over damage advantage.
Skill Value | Damage types |
---|---|
sk_plr_buckshot | DMG_BULLET, DMG_LAUNCH |
12 gauge buckshot shell. The shotgun uses this. The shotgun passes in a value of 8 for the number of bullets to fire to simulate 8 pellets in the shell in single shot mode, and 14 for weaponmode_shotgun
's double barreled secondary attack.
Skill Value | Damage types |
---|---|
sk_plr_9mm_bullet | DMG_BULLET |
Crowbar swipe. Since FireBullets
is not meant to be used by the crowbar, this will use 9mm bullet settings instead.
Skill Value | Damage types |
---|---|
sk_plr_9mm_bullet | DMG_BULLET |
Crowbar swipe. Since FireBullets
is not meant to be used by the crowbar, this will use 9mm bullet settings instead.
Skill Value | Damage types |
---|---|
None | DMG_BULLET |
Used in conjunction with custom bullet damage (the iDamage
argument).
Skill Value | Damage types |
---|---|
sk_9mm_bullet | DMG_BULLET |
Monster 9mm bullet.
Skill Value | Damage types |
---|---|
sk_9mmAR_bullet | DMG_BULLET |
Monster MP5 bullet.
Skill Value | Damage types |
---|---|
sk_556_bullet | DMG_BULLET |
Monster 5.56 NATO bullet.
Skill Value | Damage types |
---|---|
sk_556_bullet | DMG_BULLET |
Monster 5.56 NATO bullet. Uses the same skill setting as player 5.56 bullets.
Skill Value | Damage types |
---|---|
sk_12mm_bullet | DMG_BULLET |
Monster 12mm bullet. Used for large guns like the Apache's machine gun and fixed gun emplacements.
Skill Value | Damage types |
---|---|
sk_otis_bullet | DMG_BULLET |
Monster .357 revolver bullet.
Skill Value | Damage types |
---|---|
sk_massassin_sniper | DMG_SNIPER |
Monster 7.62 NATO bullet.
Skill Value | Damage types |
---|---|
sk_grunt_buckshot | DMG_BULLET, DMG_LAUNCH |
Monster 12 gauge buckshot shell. All monsters currently use the sk_hgrunt_pellets skill setting to determine how many pellets are fired.
Skill Value | Damage types |
---|---|
sk_plr_9mm_bullet | DMG_BULLET |
Decal scorch mark. This constant isn't used by FireBullets, and will fall back to the default of using the player's 9mm settings.
The following types will also launch enemies (DMG_LAUNCH
) if custom damage is specified, and the bullet type is not BULLET_PLAYER_CUSTOMDAMAGE
:
BULLET_MONSTER_SAW
BULLET_PLAYER_SAW
BULLET_PLAYER_SNIPER
BULLET_MONSTER_BUCKSHOT
BULLET_PLAYER_BUCKSHOT
If custom damage is specified, and the bullet type is not BULLET_PLAYER_CUSTOMDAMAGE
, monsters will always gib if the damage value is greater than their max health. If not, they will never gib.