version 1.5 | | version 1.6 |
---|
| | |
/* | | /* |
* static char *rcsid_los_c = | | * static char *rcsid_los_c = |
* "$Id: los.c,v 1.5 2001/07/14 04:04:53 mwedel Exp $"; | | * "$Id: los.c,v 1.6 2001/10/30 00:49:02 michtoen Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
d1 = (float) (pow(MAP_CLIENT_X/2 - dx, 2) + pow(MAP_CLIENT_Y/2 - dy,2)); | | d1 = (float) (pow(MAP_CLIENT_X/2 - dx, 2) + pow(MAP_CLIENT_Y/2 - dy,2)); |
r = (float)((dy-y)*(dy - MAP_CLIENT_Y/2) - (dx-x)*(MAP_CLIENT_X/2-dx))/d1; | | r = (float)((dy-y)*(dy - MAP_CLIENT_Y/2) - (dx-x)*(MAP_CLIENT_X/2-dx))/d1; |
s = (float)((dy-y)*(MAP_CLIENT_X/2 - dx ) - (dx-x)*(MAP_CLIENT_Y/2-dy))/d1; | | s = (float)((dy-y)*(MAP_CLIENT_X/2 - dx ) - (dx-x)*(MAP_CLIENT_Y/2-dy))/d1; |
l = FABS(sqrt(d1) * s); | | l = (float) FABS(sqrt(d1) * s); |
| | |
if (l <= SPACE_BLOCK) { | | if (l <= SPACE_BLOCK) { |
/* For simplicity, we mirror the coordinates to block the other | | /* For simplicity, we mirror the coordinates to block the other |