--- deliantra/server/socket/request.C 2006/08/19 02:57:05 1.5 +++ deliantra/server/socket/request.C 2006/08/19 03:54:23 1.6 @@ -1,6 +1,6 @@ /* * static char *rcsid_init_c = - * "$Id: request.C,v 1.5 2006/08/19 02:57:05 root Exp $"; + * "$Id: request.C,v 1.6 2006/08/19 03:54:23 root Exp $"; */ /* @@ -1831,13 +1831,18 @@ if (socket.extmap) { uint8 stat_hp = 0; + uint8 stat_width = 0; // send hp information, if applicable if (object *op = GET_MAP_FACE_OBJ (m, nx, ny, 0)) - if (op->stats.maxhp > 0 + if (!op->head + && op->stats.maxhp > 0 && (unsigned)op->stats.maxhp > (unsigned)op->stats.hp && IS_LIVE (op)) - stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; + { + stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; + stat_width = op->arch->tail_x; + } if (lastcell.stat_hp != stat_hp) { @@ -1846,6 +1851,12 @@ mask |= 0x8; *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 5); SockList_AddChar (&sl, stat_hp); + + if (stat_width > 1) + { + *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 6); + SockList_AddChar (&sl, stat_width); + } } }