else if (Keyboard[def->downright])\r
mx = motion_Right,my = motion_Down;*/\r
if(DIRECTIONIFELSEGFXTEST)\r
- if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
+ {\r
+// if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
// if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);}\r
- if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]) || player[pn].pdir == 0)\r
- my = motion_Up;\r
- if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]) || player[pn].pdir == 4)\r
- my = motion_Down;\r
- }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
+ if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]))// || player[pn].pdir != 4)\r
+ my = motion_Up;\r
+ if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))// || player[pn].pdir != 0)\r
+ my = motion_Down;\r
+// }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
// if(testcontrolnoisy > 0){ printf("lr "); printf("%u ", inpu.Keyboard[def->left]); printf("%u ", inpu.Keyboard[def->right]); }\r
- if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]) || player[pn].pdir == 1)\r
- mx = motion_Left;\r
- if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]) || player[pn].pdir == 3)\r
- mx = motion_Right;\r
+ if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]))// || player[pn].pdir != 3)\r
+ mx = motion_Left;\r
+ if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1)\r
+ mx = motion_Right;\r
}\r
//input from player\r
if (inpu.Keyboard[def->button0])\r
player[pn].info.dir = DirTable[conpee];\r
\r
//TODO: overwriting direction must be added\r
- if(player[pn].d==2) player[pn].pdir=DirTable[conpee];\r
+ if(DirTable[conpee]!=2) player[pn].pdir=DirTable[conpee];\r
if(player[pn].q==1 && (mx!=motion_None || my!=motion_None))\r
{\r
player[pn].d = player[pn].info.dir;\r
printf("cpee=%c ", dirchar(conpee));\r
//printf("(mx)=%d ", mx);\r
//printf("(my)=%d ", my);\r
- printf("pdir=%c d=%c dir=%c", dirchar(player[pn].pdir), dirchar(player[pn].d), dirchar(player[pn].info.dir));\r
+ printf("pdir=%c d=%c dir=%c ", dirchar(player[pn].pdir), dirchar(player[pn].d), dirchar(player[pn].info.dir));\r
printf("%c%d %c%d %c%d %c%d\n", dirchar(0), inpu.Keyboard[def->up], dirchar(4), inpu.Keyboard[def->down], dirchar(1), inpu.Keyboard[def->left], dirchar(3), inpu.Keyboard[def->right]);\r
}\r
//#endif\r