Revision | e58bf2b90dc23ba3100a5270500bd0703a41d931 (tree) |
---|---|
Time | 2017-03-15 18:49:52 |
Author | SUEHIRO <supersuehiro@user...> |
Commiter | SUEHIRO |
keyctrlヘルパーのコマンド入力が独立していなかったのを修正
@@ -2953,7 +2953,18 @@ public &Char | ||
2953 | 2953 | { |
2954 | 2954 | if(`acttmp > 0 && #`ani > 0) `ani~ani.action(); |
2955 | 2955 | `tickBind(); |
2956 | - if(#`cmd == 0) `cmd = .chars[`playerno][0]~cmd; | |
2956 | + if(#`cmd == 0) branch{ | |
2957 | + cond `keyctrl: | |
2958 | + `cmd.new(#.chars); | |
2959 | + `cmd~buffer.new(1); | |
2960 | + loop{index i = 0; do: | |
2961 | + `cmd[i].buffer = `cmd~buffer; | |
2962 | + `cmd[i].copyList(.chars[`playerno][0]~cmd[i]=); | |
2963 | + `cmd[i].bufReset(); | |
2964 | + while ++i < #`cmd:} | |
2965 | + else: | |
2966 | + `cmd = .chars[`playerno][0]~cmd; | |
2967 | + } | |
2957 | 2968 | branch{ |
2958 | 2969 | cond `stVal.hitdefContact != 0: |
2959 | 2970 | if(`stVal.hit.hitonce != 0 || `trMoveReversed() != 0){ |
@@ -4586,7 +4597,11 @@ public &Char | ||
4586 | 4597 | ^/char name = cl~name; |
4587 | 4598 | if( |
4588 | 4599 | `helperindex == 0 && #cl~cmd == 1 && #cl~cmd~key == 1 |
4589 | - && (int)cl~cmd~slash == #cl~hold) break; | |
4600 | + && (int)cl~cmd~slash == #cl~hold) | |
4601 | + { | |
4602 | + if(`helperindex != 0) ret false; | |
4603 | + break, break; | |
4604 | + } | |
4590 | 4605 | ret i == `cpucmd; |
4591 | 4606 | } |
4592 | 4607 | loop{index i = 0; while; do: |
@@ -6523,21 +6538,26 @@ void commandUpdate() | ||
6523 | 6538 | { |
6524 | 6539 | r.furimuki(); |
6525 | 6540 | } |
6526 | - if(r.cmd~input(r.key, r.facing)) loop{ | |
6527 | - index i = 0; | |
6528 | - bool hp = r.isHitPaused(); | |
6529 | - int buftime = (int)(hp && r.mver0() != 1); | |
6530 | - branch{ | |
6531 | - cond .super > 0: | |
6532 | - if(!act && .super <= .superendcmdbuftime) hp = true; | |
6533 | - cond .pause > 0: | |
6534 | - if(!act && .pause <= .pauseendcmdbuftime) hp = true; | |
6535 | - } | |
6536 | - while; | |
6537 | - do: | |
6538 | - r.cmd[i].step(r.facing, r.key < 0, hp, buftime + (int)hp); | |
6539 | - i++; | |
6540 | - while i < #r.cmd:} | |
6541 | + p:<-:<-[void(c=){ | |
6542 | + if( | |
6543 | + (c.helperindex == 0 || c.helperindex > 0 && c.cmd != r.cmd) | |
6544 | + && c.cmd~input(c.key, c.facing)) loop | |
6545 | + { | |
6546 | + index i = 0; | |
6547 | + bool hp = c.isHitPaused(); | |
6548 | + int buftime = (int)(hp && c.mver0() != 1); | |
6549 | + branch{ | |
6550 | + cond .super > 0: | |
6551 | + if(!act && .super <= .superendcmdbuftime) hp = true; | |
6552 | + cond .pause > 0: | |
6553 | + if(!act && .pause <= .pauseendcmdbuftime) hp = true; | |
6554 | + } | |
6555 | + while; | |
6556 | + do: | |
6557 | + c.cmd[i].step(c.facing, c.key < 0, hp, buftime + (int)hp); | |
6558 | + i++; | |
6559 | + while i < #c.cmd:} | |
6560 | + }]; | |
6541 | 6561 | if(r.key < 0){ |
6542 | 6562 | index cc = |
6543 | 6563 | r.roundState() == 2 && .m.rand(0, .com.com[i]+16) > 16 |