Skip to content

Commit

Permalink
DMRs now have rifled barrels (#17743)
Browse files Browse the repository at this point in the history
* rifling added

* renames default_spread
  • Loading branch information
Skrem7 committed Feb 4, 2023
1 parent 3e5cd3f commit 73e835d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
var/semicd = 0 //cooldown handler
var/weapon_weight = WEAPON_LIGHT
var/spread = 5 //Spread induced by the gun itself. SEE LINE BELOW.
var/default_spread = 5 //MUST be equal to the value above; used to calculate adjustments for if semi-auto is used on a burst weapon.
var/semi_auto_spread = 5 //Equal to the value above by default. The spread that a weapon will have if it is switched to semi-auto from a burst-fire mode.
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.

lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
Expand Down
7 changes: 4 additions & 3 deletions code/modules/projectiles/guns/ballistic/automatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

/obj/item/gun/ballistic/automatic/proc/burst_select()
var/mob/living/carbon/human/user = usr
var/spread_difference = initial(spread) - default_spread //Set this way so laser sights work properly. Default value of 0
var/spread_difference = initial(spread) - semi_auto_spread //Set this way so laser sights work properly. Default value of 0
select = !select
if(!select)
burst_size = 1
Expand Down Expand Up @@ -170,7 +170,7 @@

/obj/item/gun/ballistic/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
var/spread_difference = initial(spread) - default_spread //It shouldn't need this but just in case someone decides to nerf the M90-gl's accuracy for whatever reason
var/spread_difference = initial(spread) - semi_auto_spread //It shouldn't need this but just in case someone decides to nerf the M90-gl's accuracy for whatever reason
switch(select)
if(0)
select = 1
Expand Down Expand Up @@ -313,6 +313,7 @@
mag_type = /obj/item/ammo_box/magazine/m308
fire_delay = 6
burst_size = 1
spread = 2 //Marksman rifle == accurate?
can_suppress = FALSE
can_bayonet = TRUE
knife_x_offset = 27
Expand Down Expand Up @@ -340,6 +341,7 @@
mag_type = /obj/item/ammo_box/magazine/ks762
fire_delay = 5 //Can fire slightly faster than the LWT-650
burst_size = 1
spread = 2 //DMR gets to be special
can_suppress = FALSE
zoomable = TRUE
zoom_amt = 5 //Not as significant a scope as the sniper
Expand Down Expand Up @@ -371,7 +373,6 @@
fire_delay = 40
burst_size = 1
spread = 0
default_spread = 0 //It's a sniper rifle, it doesn't miss.
w_class = WEIGHT_CLASS_NORMAL
zoomable = TRUE
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
Expand Down

0 comments on commit 73e835d

Please sign in to comment.