ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/item.C
(Generate patch)

Comparing deliantra/server/socket/item.C (file contents):
Revision 1.34 by root, Mon Jan 15 02:39:41 2007 UTC vs.
Revision 1.35 by root, Sun Jan 21 21:28:27 2007 UTC

304 { 304 {
305 if (head->anim_speed) 305 if (head->anim_speed)
306 anim_speed = head->anim_speed; 306 anim_speed = head->anim_speed;
307 else 307 else
308 { 308 {
309 if (FABS (head->speed) < 0.001) 309 if (fabs (head->speed) < 0.001)
310 anim_speed = 255; 310 anim_speed = 255;
311 else if (FABS (head->speed) >= 1.0) 311 else if (fabs (head->speed) >= 1.0)
312 anim_speed = 1; 312 anim_speed = 1;
313 else 313 else
314 anim_speed = (int) (1.0 / FABS (head->speed)); 314 anim_speed = (int) (1.0 / fabs (head->speed));
315 } 315 }
316 316
317 if (anim_speed > 255) 317 if (anim_speed > 255)
318 anim_speed = 255; 318 anim_speed = 255;
319 } 319 }
604 { 604 {
605 if (op->anim_speed) 605 if (op->anim_speed)
606 anim_speed = op->anim_speed; 606 anim_speed = op->anim_speed;
607 else 607 else
608 { 608 {
609 if (FABS (op->speed) < 0.001) 609 if (fabs (op->speed) < 0.001)
610 anim_speed = 255; 610 anim_speed = 255;
611 else if (FABS (op->speed) >= 1.0) 611 else if (fabs (op->speed) >= 1.0)
612 anim_speed = 1; 612 anim_speed = 1;
613 else 613 else
614 anim_speed = (int) (1.0 / FABS (op->speed)); 614 anim_speed = (int) (1.0 / fabs (op->speed));
615 } 615 }
616 616
617 if (anim_speed > 255) 617 if (anim_speed > 255)
618 anim_speed = 255; 618 anim_speed = 255;
619 } 619 }
895 { 895 {
896 return; 896 return;
897 } 897 }
898 dy = atoi (cp); 898 dy = atoi (cp);
899 899
900 if (FABS (dx) > pl->ns->mapx / 2 || FABS (dy) > pl->ns->mapy / 2) 900 if (fabs (dx) > pl->ns->mapx / 2 || fabs (dy) > pl->ns->mapy / 2)
901 return; 901 return;
902 902
903 if (pl->blocked_los[dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2]) 903 if (pl->blocked_los[dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2])
904 return; 904 return;
905 905

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines