--- deliantra/server/common/object.c 2006/06/04 19:46:55 1.6 +++ deliantra/server/common/object.c 2006/06/23 18:30:22 1.7 @@ -1631,7 +1631,7 @@ (op->face && !op->face->visibility)) { for (last=top; last != floor; last=last->below) if (QUERY_FLAG(last, FLAG_BLOCKSVIEW)&&(last->type != EXIT)) break; - /* Check to see i we found the object that blocks view, + /* Check to see if we found the object that blocks view, * and make sure we have a below pointer for it so that * we can get inserted below this one, which requires we * set top to the object below us. @@ -2394,10 +2394,14 @@ int find_dir_2(int x, int y) { int q; - if(!y) + + if(y) + q=x*100/y; + else if (x) q= -300*x; else - q=x*100/y; + return 0; + if(y>0) { if(q < -242) return 3 ; @@ -2409,6 +2413,7 @@ return 8 ; return 7 ; } + if (q < -242) return 7 ; if (q < -41) @@ -2417,6 +2422,7 @@ return 5 ; if (q < 242) return 4 ; + return 3 ; }