{\r
if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]))\r
- {\r
my = motion_Up;\r
- }\r
if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))\r
- {\r
my = motion_Down;\r
- }\r
}else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]))\r
- {\r
mx = motion_Left;\r
- }\r
if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1)\r
- {\r
mx = motion_Right;\r
- }\r
}else{ //2 keys pressed\r
switch (player[pn].pdir)\r
{\r
case 4:\r
if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])) dir = DirTable[1];\r
else if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])) dir = DirTable[3];\r
- if(testcontrolnoisy > 0) printf("dir=%c ", dirchar(dir));\r
break;\r
case 1:\r
case 3:\r
if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])) dir = DirTable[0];\r
else if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])) dir = DirTable[4];\r
- if(testcontrolnoisy > 0) printf("dir=%c ", dirchar(dir));\r
break;\r
default:\r
break;\r
}\r
- if(testcontrolnoisy > 0) printf("pdir=%c ", dirchar(player[pn].pdir));\r
+ if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); }\r
}\r
}\r
//input from player\r