Skip to content

Commit

Permalink
bugfix: Отключение анимации атаки теперь работает (#6586)
Browse files Browse the repository at this point in the history
  • Loading branch information
dageavtobusnick authored Feb 25, 2025
1 parent 7e843c4 commit 2de6bac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1286,12 +1286,12 @@
// we will register on turf to avoid image changes with attacked_atom transforms
var/turf/image_loc = get_turf(attacked_atom)
if(visual_effect_icon)
attack_image = image(icon = 'icons/effects/effects.dmi', icon_state = visual_effect_icon)
attack_image = image('icons/effects/effects.dmi', image_loc, visual_effect_icon, attacked_atom.layer + 0.1)
if(ismob(src) && ismob(attacked_atom))
var/mob/attacker = src
attack_image.color = attacker.a_intent == INTENT_HARM ? "#ff0000" : "#ffffff"
else if(used_item)
attack_image = image(icon = used_item)
attack_image = image(icon = used_item, loc = image_loc, layer = attacked_atom.layer + 0.1)
// Scale the icon.
attack_image.transform *= 0.4
// The icon should not rotate.
Expand Down Expand Up @@ -1324,10 +1324,10 @@
if(viewer.client && (viewer.client.prefs.toggles2 & PREFTOGGLE_2_ITEMATTACK))
viewing += viewer.client

var/atom/movable/flick_visual/attack = attacked_atom.flick_overlay_view(attack_image, 0.7 SECONDS)
flick_overlay(attack_image, viewing, 0.7 SECONDS)
var/matrix/initial_transform = new(transform)
// And animate the attack!
animate(attack, alpha = 175, transform = initial_transform.Scale(0.75), pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 0.3 SECONDS)
animate(attack_image, alpha = 175, transform = initial_transform.Scale(0.75), pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 0.3 SECONDS)
animate(time = 0.1 SECONDS)
animate(alpha = 0, time = 0.3 SECONDS, easing = (CIRCULAR_EASING|EASE_OUT))

Expand Down

0 comments on commit 2de6bac

Please sign in to comment.