[CF-Devel] bug - monster.c
Mark Wedel
mwedel at sonic.net
Tue Oct 30 00:07:04 CST 2001
Changing that to rv->distance appears to be the correct fix to me.
Michael Toennies wrote:
>
>
Iam not so deep in this kind of functions and CVs is down.
>
If someone has a better fix, do it. Iam here not sure about how
>
it really works.
>
>
int dist_att (int dir , object *ob, object *enemy, object *part, rv_vector
>
*rv) {
>
int dist;
>
>
if (can_hit(part,enemy,rv))
>
return dir;
>
if (rv->distance < 10)
>
return absdir(dir+4);
>
/* This was 81 below? That seems outragously far - I'm thinking that
>
was
>
* a typo and it shoud be 18
>
*/
>
else if (dist>18) { ** <- dist has no valid value - so this will go
>
funny random
>
return dir;
>
}
>
return 0;
>
}
>
>
I'll changed this to
>
>
else if (rv->distance>18) {
>
>
_______________________________________________
>
crossfire-devel mailing list
>
crossfire-devel at lists.real-time.com
>
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list