Skip to content

Commit

Permalink
unit animations - fix wrong-facing glitch for units with animated tor…
Browse files Browse the repository at this point in the history
…ch flame overlay - also allow for ne facing standing animations
  • Loading branch information
doofus-01 committed Feb 6, 2021
1 parent fb07c24 commit d3f94aa
Showing 1 changed file with 42 additions and 20 deletions.
62 changes: 42 additions & 20 deletions data/core/macros/animation-utils.cfg
Expand Up @@ -1066,40 +1066,51 @@
#enddef

#define STANDING_ANIM_BIG_TORCH IMG X X2 Y

#arg IMG_NE
{IMG}
#endarg

#arg X_NE
{X}
#endarg

#arg Y_NE
{Y}
#endarg

[standing_anim]
start_time=0
torch_start_time=0

[if]
direction=n,ne,se
direction=n,ne,nw
[frame]
image={IMG}
auto_hflip=no
image={IMG_NE}
auto_vflip=no
primary=yes
[/frame]
[torch_frame]
image="halo/torch/torch-big/flame-[1~17].png:120"
layer=45
x={X}
y={Y}
auto_hflip=no
directional_x={X_NE}
y={Y_NE}
auto_hflip=yes
auto_vflip=no
primary=no
[/torch_frame]
[/if]
[else]
direction=s,sw,nw
direction=s,sw,se
[frame]
image={IMG}~FL(horiz)
auto_hflip=no
image={IMG}
auto_vflip=no
primary=yes
[/frame]
[torch_frame]
image="halo/torch/torch-big/flame-[1~17].png:120"
layer=45
x={X2}
directional_x={X}
y={Y}
auto_hflip=yes
auto_vflip=no
Expand All @@ -1110,40 +1121,51 @@
#enddef

#define STANDING_ANIM_SMALL_TORCH IMG X X2 Y

#arg IMG_NE
{IMG}
#endarg

#arg X_NE
{X}
#endarg

#arg Y_NE
{Y}
#endarg

[standing_anim]
start_time=0
torch_start_time=0

[if]
direction=n,ne,se
direction=n,ne,nw
[frame]
image={IMG}
auto_hflip=no
image={IMG_NE}
auto_vflip=no
primary=yes
[/frame]
[torch_frame]
image="halo/torch/torch-small/flame-[1~17].png:120"
layer=45
x={X}
y={Y}
auto_hflip=no
directional_x={X_NE}
y={Y_NE}
auto_hflip=yes
auto_vflip=no
primary=no
[/torch_frame]
[/if]
[else]
direction=s,sw,nw
direction=s,sw,se
[frame]
image={IMG}~FL(horiz)
auto_hflip=no
image={IMG}
auto_vflip=no
primary=yes
[/frame]
[torch_frame]
image="halo/torch/torch-small/flame-[1~17].png:120"
layer=45
x={X2}
directional_x={X}
y={Y}
auto_hflip=yes
auto_vflip=no
Expand Down

0 comments on commit d3f94aa

Please sign in to comment.