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.3 by root, Fri Aug 18 02:06:58 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.3 2006/08/18 02:06:58 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
1272{ 1272{
1273 cell->faces[0] = face0; 1273 cell->faces[0] = face0;
1274 cell->faces[1] = face1; 1274 cell->faces[1] = face1;
1275 cell->faces[2] = face2; 1275 cell->faces[2] = face2;
1276 cell->count = count; 1276 cell->count = count;
1277 cell->stat_hp = 255; 1277 cell->stat_hp = 0;
1278} 1278}
1279 1279
1280#define MAX_HEAD_POS MAX(MAX_CLIENT_X, MAX_CLIENT_Y) 1280#define MAX_HEAD_POS MAX(MAX_CLIENT_X, MAX_CLIENT_Y)
1281#define MAX_LAYERS 3 1281#define MAX_LAYERS 3
1282 1282
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