From: sparky4 Date: Sun, 13 Mar 2016 04:24:28 +0000 (-0600) Subject: pdir X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=396ebe0094d8a99de67a95c99695c2277ceed9fe;p=16.git pdir --- diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 52a76774..546d3dbd 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -854,21 +854,18 @@ register KeyboardDef *def; mx = motion_Left,my = motion_Down; else if (Keyboard[def->downright]) mx = motion_Right,my = motion_Down;*/ - if(DIRECTIONIFELSEGFXTEST) - { - if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){// && (inpu.Keyboard[def->up] || inpu.Keyboard[def->down])){ -// if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);} - if(inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])// || player[pn].info.pdir == 0) - my = motion_Up; - if(inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])// || player[pn].info.pdir == 4) - my = motion_Down; - }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){// && (inpu.Keyboard[def->left] || inpu.Keyboard[def->right])){ -// if(testcontrolnoisy > 0){ printf("lr "); printf("%u ", inpu.Keyboard[def->left]); printf("%u ", inpu.Keyboard[def->right]); } - if(inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])// || player[pn].info.pdir == 1) - mx = motion_Left; - if(inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])// || player[pn].info.pdir == 3) - mx = motion_Right; - } + if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){ +// if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);} + if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]) || player[pn].pdir == 0) + my = motion_Up; + if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]) || player[pn].pdir == 4) + my = motion_Down; + }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){ +// if(testcontrolnoisy > 0){ printf("lr "); printf("%u ", inpu.Keyboard[def->left]); printf("%u ", inpu.Keyboard[def->right]); } + if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]) || player[pn].pdir == 1) + mx = motion_Left; + if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]) || player[pn].pdir == 3) + mx = motion_Right; } //input from player if (inpu.Keyboard[def->button0])