--- deliantra/server/socket/request.C 2008/04/15 14:21:04 1.124 +++ deliantra/server/socket/request.C 2008/04/22 04:33:20 1.125 @@ -1244,25 +1244,24 @@ // send hp information, if applicable if (object *op = ms.faces_obj [0]) - { - if (op->head || op->invisible) - ; // do not show - else if (op->type == PLAYER - || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR)) - { - if (op->stats.maxhp > 0 && (unsigned) op->stats.maxhp > (unsigned) op->stats.hp) - { - stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; - stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge - } - } + if (op->is_head () && !op->invisible) + { + if (op->stats.maxhp > op->stats.hp + && op->stats.maxhp > 0 + && (op->type == PLAYER + || op->type == DOOR // does not work, have maxhp 0 + || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR))) + { + stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; + stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge + } - if (op->msg && op->msg[0] == '@') - flags |= 1; + if (op->msg && op->msg[0] == '@') + flags |= 1; - if (op->type == PLAYER && op != ob) - player = op->count; - } + if (op->type == PLAYER && op != ob) + player = op->count; + } if (lastcell.stat_hp != stat_hp) {