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.132 by elmex, Sun Jun 15 19:34:31 2008 UTC vs.
Revision 1.135 by root, Fri Aug 1 16:31:58 2008 UTC

1177 1177
1178 int d = pl->blocked_los[ax][ay]; 1178 int d = pl->blocked_los[ax][ay];
1179 1179
1180 if (d > 3) 1180 if (d > 3)
1181 { 1181 {
1182
1183 int need_send = 0, count; 1182 int need_send = 0, count;
1184 1183
1185 /* This block deals with spaces that are not visible for whatever 1184 /* This block deals with spaces that are not visible for whatever
1186 * reason. Still may need to send the head for this space. 1185 * reason. Still may need to send the head for this space.
1187 */ 1186 */
1193 if (lastcell.count != -1) 1192 if (lastcell.count != -1)
1194 need_send = 1; 1193 need_send = 1;
1195 1194
1196 count = -1; 1195 count = -1;
1197 1196
1198 /* properly clear a previously sent big face */
1199 if (lastcell.faces[0] || lastcell.faces[1] || lastcell.faces[2] 1197 if (lastcell.faces[0] || lastcell.faces[1] || lastcell.faces[2]
1200 || lastcell.stat_hp || lastcell.flags || lastcell.player) 1198 || lastcell.stat_hp || lastcell.flags || lastcell.player)
1201 need_send = 1; 1199 need_send = 1;
1202 1200
1201 /* properly clear a previously sent big face */
1203 map_clearcell (&lastcell, count); 1202 map_clearcell (&lastcell, count);
1204 1203
1205 if ((mask & 0xf) || need_send) 1204 if ((mask & 0xf) || need_send)
1206 sl[oldlen + 1] = mask & 0xff; 1205 sl[oldlen + 1] = mask & 0xff;
1207 else 1206 else
1263 { 1262 {
1264 if (op->stats.maxhp > op->stats.hp 1263 if (op->stats.maxhp > op->stats.hp
1265 && op->stats.maxhp > 0 1264 && op->stats.maxhp > 0
1266 && (op->type == PLAYER 1265 && (op->type == PLAYER
1267 || op->type == DOOR // does not work, have maxhp 0 1266 || op->type == DOOR // does not work, have maxhp 0
1268 || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR))) 1267 || QUERY_FLAG (op, FLAG_MONSTER)
1268 || QUERY_FLAG (op, FLAG_ALIVE)
1269 || QUERY_FLAG (op, FLAG_GENERATOR)))
1269 { 1270 {
1270 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; 1271 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp;
1271 stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge 1272 stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge
1272 } 1273 }
1273 1274
1274 if (op->msg && op->msg[0] == '@') 1275 if (op->has_dialogue ())
1275 flags |= 1; 1276 flags |= 1;
1276 1277
1277 if (op->type == PLAYER && op != ob) 1278 if (op->type == PLAYER)
1278 player = op->count; 1279 player = ob == op ? pl->ob->count : op->count;
1279 } 1280 }
1280 1281
1281 if (lastcell.stat_hp != stat_hp) 1282 if (lastcell.stat_hp != stat_hp)
1282 { 1283 {
1283 lastcell.stat_hp = stat_hp; 1284 lastcell.stat_hp = stat_hp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines