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

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.4 by root, Fri Aug 18 02:23:28 2006 UTC vs.
Revision 1.5 by root, Sat Aug 19 02:57:05 2006 UTC

1/* 1/*
2 * static char *rcsid_init_c = 2 * static char *rcsid_init_c =
3 * "$Id: request.C,v 1.4 2006/08/18 02:23:28 root Exp $"; 3 * "$Id: request.C,v 1.5 2006/08/19 02:57:05 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
1833 uint8 stat_hp = 0; 1833 uint8 stat_hp = 0;
1834 1834
1835 // send hp information, if applicable 1835 // send hp information, if applicable
1836 if (object *op = GET_MAP_FACE_OBJ (m, nx, ny, 0)) 1836 if (object *op = GET_MAP_FACE_OBJ (m, nx, ny, 0))
1837 if (op->stats.maxhp > 0 1837 if (op->stats.maxhp > 0
1838 && (unsigned)op->stats.maxhp + 1 > (unsigned)op->stats.hp 1838 && (unsigned)op->stats.maxhp > (unsigned)op->stats.hp
1839 && IS_LIVE (op)) 1839 && IS_LIVE (op))
1840 stat_hp = 255 - op->stats.hp * 255 / op->stats.maxhp; 1840 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp;
1841 1841
1842 if (lastcell.stat_hp != stat_hp) 1842 if (lastcell.stat_hp != stat_hp)
1843 { 1843 {
1844 lastcell.stat_hp = stat_hp; 1844 lastcell.stat_hp = stat_hp;
1845 1845

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines