File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -353,10 +353,10 @@ export class Grid {
353353 vprev . block = Block . switchPressed ;
354354 vprev . dy = 0 ;
355355 vprev . vy = 0 ;
356- } else if ( vprev ?. block === Block . switchPressed ) {
356+ } else if ( vprev ?. block === Block . switchPressed && cNewCell . block === Block . switch ) {
357357 // switchがプレイヤーに押されているのが戻るとき
358358 assert (
359- cprev . block === Block . switchPressed || cprev . block === Block . switch ,
359+ cprev . block === Block . switchPressed || cprev . block === Block . switch || cprev . block === Block . movable ,
360360 "block is not switch or switchPressed" ,
361361 ) ;
362362 const switchId = cprev . switchId ;
@@ -374,7 +374,7 @@ export class Grid {
374374 vprev . vy = 0 ;
375375 }
376376 // switch上にオブジェクトを置くとき
377- else if ( vprev ?. block === Block . switch ) {
377+ else if ( vprev ?. block === Block . switch || vprev ?. block === Block . switchPressed ) {
378378 if ( cNewCell . block !== Block . movable && cNewCell . block !== Block . fallable ) {
379379 console . warn ( "No block other than movable cannot be placed on the switch" ) ;
380380 console . log ( "cell.block" , cNewCell . block ) ;
You can’t perform that action at this time.
0 commit comments