Skip to content

Commit

Permalink
When cloning animation for an attack, use the male version if the fem…
Browse files Browse the repository at this point in the history
…ale variation doesn't have one
  • Loading branch information
Dugy committed Jul 1, 2024
1 parent e71984e commit 9d5eb9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,14 @@ function wesnoth.update_stats(original)
end
end
local unit_type = wesnoth.unit_types[remade.type].__cfg
get_best_anim(unit_type)
if remade.gender == "female" then
local female = wml.get_child(unit_type, "female")
if female then
unit_type = female
get_best_anim(unit_type)
end
end
get_best_anim(unit_type)
for variation in wml.child_range(unit_type, "variation") do
if variation.variation_name == remade.variation then
get_best_anim(variation)
Expand Down

0 comments on commit 9d5eb9b

Please sign in to comment.