Skip to content

Commit

Permalink
changes and stuff, no clue why ak47 recoil is bork
Browse files Browse the repository at this point in the history
  • Loading branch information
rye-rice committed Sep 28, 2023
1 parent 6530765 commit 68fa877
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
var/on_hit_state = P.on_hit(src, armor, piercing_hit)
if(!P.nodamage && on_hit_state != BULLET_ACT_BLOCK && !QDELETED(src)) //QDELETED literally just for the instagib rifle. Yeah.
apply_damage(P.damage, P.damage_type, def_zone, armor)
recoil_camera(src, clamp((P.damage-armor)/2,1,10), clamp((P.damage-armor)/2,1,10), P.damage/7, P.Angle)
recoil_camera(src, clamp((P.damage-armor)/4,0.5,10), clamp((P.damage-armor)/4,0.5,10), P.damage/8, P.Angle)
apply_effects(P.stun, P.knockdown, P.unconscious, P.irradiate, P.slur, P.stutter, P.eyeblur, P.drowsy, armor, P.stamina, P.jitter, P.paralyze, P.immobilize)
if(P.dismemberment)
check_projectile_dismemberment(P, def_zone)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/boxes_magazines/external/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
icon_state = "ak47_mag"
ammo_type = /obj/item/ammo_casing/a762_39
caliber = "7.62x39mm"
max_ammo = 20
max_ammo = 30

/obj/item/ammo_box/magazine/ak47/update_icon_state()
. = ..()
Expand Down
3 changes: 2 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@

/obj/item/gun/proc/shoot_live_shot(mob/living/user, pointblank = 0, atom/pbtarget = null, message = 1)
var/actual_angle = get_angle_with_scatter((user || get_turf(src)), pbtarget, rand(-recoil_deviation, recoil_deviation) + 180)
var/muzzle_angle = Get_Angle(get_turf(src), pbtarget)
if(muzzle_flash && !muzzle_flash.applied)
handle_muzzle_flash(user, actual_angle)
handle_muzzle_flash(user, muzzle_angle)

if(wielded_fully && recoil)
simulate_recoil(user, recoil, actual_angle)
Expand Down
10 changes: 5 additions & 5 deletions code/modules/projectiles/guns/ballistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,23 +223,23 @@
playsound(src, eject_empty_sound, eject_sound_volume, eject_sound_vary)
magazine.forceMove(drop_location())
var/obj/item/ammo_box/magazine/old_mag = magazine
old_mag.update_appearance()
magazine = null
if (display_message)
to_chat(user, "<span class='notice'>You pull the [magazine_wording] out of \the [src].</span>")
update_appearance()
if (tac_load)
if(do_after(user, tactical_reload_delay, TRUE, src))
if (insert_magazine(user, tac_load, FALSE))
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src].</span>")
else
to_chat(user, "<span class='warning'>You dropped the old [magazine_wording], but the new one doesn't fit. How embarassing.</span>")
magazine = null
else
to_chat(user, "<span class='warning'>Your reload was interupted!</span>")
return

else
magazine = null
user.put_in_hands(old_mag)
old_mag.update_appearance()
if (display_message)
to_chat(user, "<span class='notice'>You pull the [magazine_wording] out of \the [src].</span>")
update_appearance()

/obj/item/gun/ballistic/can_shoot()
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/ballistic/assault.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
eject_empty_sound = 'sound/weapons/gun/rifle/ar_unload.ogg'

rack_sound = 'sound/weapons/gun/rifle/ar_cock.ogg'
spread_unwielded = 20

/obj/item/gun/ballistic/automatic/assault/ak47
name = "\improper SVG-67"
Expand Down

0 comments on commit 68fa877

Please sign in to comment.