… | |
… | |
2088 | |
2088 | |
2089 | if (socket.extmap) |
2089 | if (socket.extmap) |
2090 | { |
2090 | { |
2091 | uint8 stat_hp = 0; |
2091 | uint8 stat_hp = 0; |
2092 | uint8 stat_width = 0; |
2092 | uint8 stat_width = 0; |
|
|
2093 | uint8 flags = 0; |
2093 | tag_t player = 0; |
2094 | tag_t player = 0; |
2094 | |
2095 | |
2095 | // send hp information, if applicable |
2096 | // send hp information, if applicable |
2096 | if (object *op = GET_MAP_FACE_OBJ (m, nx, ny, 0)) |
2097 | if (object *op = GET_MAP_FACE_OBJ (m, nx, ny, 0)) |
2097 | { |
2098 | { |
… | |
… | |
2105 | stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; |
2106 | stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; |
2106 | stat_width = op->arch->tail_x; |
2107 | stat_width = op->arch->tail_x; |
2107 | } |
2108 | } |
2108 | } |
2109 | } |
2109 | |
2110 | |
|
|
2111 | if (op->msg && op->msg[0] == '@') |
|
|
2112 | flags |= 1; |
|
|
2113 | |
2110 | if (op->type == PLAYER && op != pl) |
2114 | if (op->type == PLAYER && op != pl) |
2111 | player = op->count; |
2115 | player = op->count; |
2112 | } |
2116 | } |
2113 | |
2117 | |
2114 | if (lastcell.stat_hp != stat_hp) |
2118 | if (lastcell.stat_hp != stat_hp) |
… | |
… | |
2138 | *last_ext |= 0x80; |
2142 | *last_ext |= 0x80; |
2139 | last_ext = sl.buf + sl.len; |
2143 | last_ext = sl.buf + sl.len; |
2140 | SockList_AddChar (&sl, 0x47); |
2144 | SockList_AddChar (&sl, 0x47); |
2141 | SockList_AddChar (&sl, 4); |
2145 | SockList_AddChar (&sl, 4); |
2142 | SockList_AddInt (&sl, player); |
2146 | SockList_AddInt (&sl, player); |
|
|
2147 | } |
|
|
2148 | |
|
|
2149 | if (lastcell.flags != flags) |
|
|
2150 | { |
|
|
2151 | lastcell.flags = flags; |
|
|
2152 | |
|
|
2153 | mask |= 0x8; |
|
|
2154 | *last_ext |= 0x80; |
|
|
2155 | last_ext = sl.buf + sl.len; |
|
|
2156 | SockList_AddChar (&sl, 8); |
|
|
2157 | SockList_AddChar (&sl, flags); |
2143 | } |
2158 | } |
2144 | } |
2159 | } |
2145 | |
2160 | |
2146 | /* Floor face */ |
2161 | /* Floor face */ |
2147 | if (update_space (&sl, &socket, m, nx, ny, ax, ay, 2)) |
2162 | if (update_space (&sl, &socket, m, nx, ny, ax, ay, 2)) |