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.37 by root, Sat Feb 10 01:52:29 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 }
674 */ 674 */
675 675
676void 676void
677esrv_del_item (player *pl, int tag) 677esrv_del_item (player *pl, int tag)
678{ 678{
679 if (!pl->ns)
680 return;
681
679 packet sl ("delitem"); 682 packet sl ("delitem");
680 683
681 sl << uint32 (tag); 684 sl << uint32 (tag);
682 685
683 pl->ns->send_packet (sl); 686 pl->ns->send_packet (sl);
879 else 882 else
880 new_draw_info (NDI_UNIQUE, 0, op, "You see nothing."); 883 new_draw_info (NDI_UNIQUE, 0, op, "You see nothing.");
881 } 884 }
882} 885}
883 886
884
885
886/** Client wants to look at some object. Lets do so. */ 887/** Client wants to look at some object. Lets do so. */
887void 888void
888LookAt (char *buf, int len, player *pl) 889LookAt (char *buf, int len, player *pl)
889{ 890{
890 int dx, dy; 891 int dx, dy;
895 { 896 {
896 return; 897 return;
897 } 898 }
898 dy = atoi (cp); 899 dy = atoi (cp);
899 900
900 if (FABS (dx) > pl->ns->mapx / 2 || FABS (dy) > pl->ns->mapy / 2) 901 if (fabs (dx) > pl->ns->mapx / 2 || fabs (dy) > pl->ns->mapy / 2)
901 return; 902 return;
902 903
903 if (pl->blocked_los[dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2]) 904 if (pl->blocked_los[dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2])
904 return; 905 return;
905 906

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines