Skip to content

Commit

Permalink
Merge pull request #1973 from ikemen-engine/fix
Browse files Browse the repository at this point in the history
fix: Select screen character anim default values
  • Loading branch information
K4thos authored Aug 27, 2024
2 parents ca57eb0 + 8b7f662 commit 8ceddd7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions data/system.base.def
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@
p1.face.anim = -1
; Done variants replace spr/anim once character is selected
p1.face.done.anim = -1
p1.face.done.spr = 9000, 1
p1.face.done.spr =
; Spacing between portraits.
p1.face.spacing = 0, 0
; Set to 1 to enable automatic spacing adjustment based on team size
Expand All @@ -649,7 +649,7 @@
p2.face.num = 1
p2.face.anim = -1
p2.face.done.anim = -1
p2.face.done.spr = 9000, 1
p2.face.done.spr =
p2.face.spacing = 0, 0
p2.face.padding = 0

Expand All @@ -658,7 +658,7 @@
;p<pn>.member<num>.face.anim = -1
;p<pn>.member<num>.face.spr = 9000, 1
;p<pn>.member<num>.face.done.anim = -1
;p<pn>.member<num>.face.done.spr = 9000, 1
;p<pn>.member<num>.face.done.spr =
;p<pn>.member<num>.face.offset = 0, 0
;p<pn>.member<num>.face.scale = 1.0, 1.0

Expand Down
6 changes: 3 additions & 3 deletions external/script/motif.lua
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ local motif =
p1_face_anim = -1, --Ikemen feature
p1_face_spr = {9000, 1},
p1_face_done_anim = -1, --Ikemen feature
p1_face_done_spr = {9000, 1}, --Ikemen feature
p1_face_done_spr = {}, --Ikemen feature
p1_face_offset = {0, 0},
p1_face_facing = 1,
p1_face_scale = {1.0, 1.0},
Expand All @@ -371,7 +371,7 @@ local motif =
p2_face_num = 1, --Ikemen feature
p2_face_anim = -1, --Ikemen feature
p2_face_done_anim = -1, --Ikemen feature
p2_face_done_spr = {9000, 1}, --Ikemen feature
p2_face_done_spr = {}, --Ikemen feature
p2_face_spr = {9000, 1},
p2_face_offset = {0, 0},
p2_face_facing = -1,
Expand All @@ -382,7 +382,7 @@ local motif =
--p<pn>_member<num>_face_anim = -1, --Ikemen feature
--p<pn>_member<num>_face_spr = {9000, 1}, --Ikemen feature
--p<pn>_member<num>_face_done_anim = -1, --Ikemen feature
--p<pn>_member<num>_face_done_spr = {9000, 1}, --Ikemen feature
--p<pn>_member<num>_face_done_spr = {}, --Ikemen feature
--p<pn>_member<num>_face_offset = {0, 0}, --Ikemen feature
--p<pn>_member<num>_face_scale = {1.0, 1.0}, --Ikemen feature
--p<pn>_member<num>_face_slide_speed = {0, 0}, --Ikemen feature
Expand Down
5 changes: 3 additions & 2 deletions external/script/start.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2645,8 +2645,9 @@ function start.f_selectMenu(side, cmd, player, member, selectState)
-- if select anim differs from done anim and coop or pX.face.num allows to display more than 1 portrait or it's the last team member
local done_anim = motif.select_info['p' .. side .. '_member' .. member .. '_face_done_anim'] or motif.select_info['p' .. side .. '_face_done_anim']
if done_anim ~= -1 and start.p[side].t_selTemp[member].anim ~= done_anim and (main.coop or motif.select_info['p' .. side .. '_face_num'] > 1 or main.f_tableLength(start.p[side].t_selected) + 1 == start.p[side].numChars) then
start.p[side].t_selTemp[member].anim_data = start.f_animGet(start.c[player].selRef, side, member, motif.select_info, '_face', '_done', false) or start.p[side].t_selTemp[member].anim_data
if start.p[side].t_selTemp[member].anim_data ~= nil then
local a = start.f_animGet(start.c[player].selRef, side, member, motif.select_info, '_face', '_done', false)
if a then
start.p[side].t_selTemp[member].anim_data = a
start.p[side].screenDelay = math.min(120, math.max(start.p[side].screenDelay, animGetLength(start.p[side].t_selTemp[member].anim_data)))
end
end
Expand Down

0 comments on commit 8ceddd7

Please sign in to comment.