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.101 by root, Sun Jun 3 17:05:36 2007 UTC vs.
Revision 1.104 by root, Tue Jun 5 13:05:03 2007 UTC

522 * commands. 522 * commands.
523 */ 523 */
524 pl->count = 0; 524 pl->count = 0;
525} 525}
526 526
527
528/** 527/**
529 * This handles the general commands from the client (ie, north, fire, cast, 528 * This handles the general commands from the client (ie, north, fire, cast,
530 * etc.). It is a lot like PlayerCmd above, but is called with the 529 * etc.). It is a lot like PlayerCmd above, but is called with the
531 * 'ncom' method which gives more information back to the client so it 530 * 'ncom' method which gives more information back to the client so it
532 * can throttle. 531 * can throttle.
738 buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name; 737 buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name;
739 738
740 if (pl->combat_ob) 739 if (pl->combat_ob)
741 buf << " Combat" << (pl->ob->current_weapon == pl->combat_ob ? "*" : "") << ": " << pl->combat_ob->name; 740 buf << " Combat" << (pl->ob->current_weapon == pl->combat_ob ? "*" : "") << ": " << pl->combat_ob->name;
742 741
742#if 0
743 //TODO: remove this when slot system is working, this is only for debugging 743 //TODO: remove this when slot system is working, this is only for debugging
744 if (pl->ob->chosen_skill) 744 if (pl->ob->chosen_skill)
745 buf << " Skill*: " << pl->ob->chosen_skill->name; 745 buf << " Skill*: " << pl->ob->chosen_skill->name;
746#endif
746 747
747 //TODO: maybe golem should become the current_weapon, quite simply? 748 //TODO: maybe golem should become the current_weapon, quite simply?
748 if (pl->golem) 749 if (pl->golem)
749 buf << " Golem*: " << pl->golem->name; 750 buf << " Golem*: " << pl->golem->name;
750 751
1038 1039
1039 check_map_change (pl); 1040 check_map_change (pl);
1040 prefetch_surrounding_maps (pl->ob); 1041 prefetch_surrounding_maps (pl->ob);
1041 1042
1042 /* do LOS after calls to update_position */ 1043 /* do LOS after calls to update_position */
1044 if (ob != pl->ob)
1045 clear_los (pl);
1043 if (pl->do_los) 1046 else if (pl->do_los)
1044 { 1047 {
1045 update_los (ob); 1048 update_los (ob);
1046 pl->do_los = 0; 1049 pl->do_los = 0;
1047 } 1050 }
1048 1051
1138 continue; 1141 continue;
1139 } 1142 }
1140 1143
1141 m->touch (); 1144 m->touch ();
1142 1145
1143 int d = ob->contr->blocked_los[ax][ay]; 1146 int d = pl->blocked_los[ax][ay];
1144 1147
1145 if (d > 3) 1148 if (d > 3)
1146 { 1149 {
1147 1150
1148 int need_send = 0, count; 1151 int need_send = 0, count;
1230 || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR)) 1233 || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR))
1231 { 1234 {
1232 if (op->stats.maxhp > 0 && (unsigned) op->stats.maxhp > (unsigned) op->stats.hp) 1235 if (op->stats.maxhp > 0 && (unsigned) op->stats.maxhp > (unsigned) op->stats.hp)
1233 { 1236 {
1234 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; 1237 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp;
1235 stat_width = op->arch->tail_x; 1238 stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge
1236 } 1239 }
1237 } 1240 }
1238 1241
1239 if (op->msg && op->msg[0] == '@') 1242 if (op->msg && op->msg[0] == '@')
1240 flags |= 1; 1243 flags |= 1;
1308 } 1311 }
1309 } 1312 }
1310 /* Top face */ 1313 /* Top face */
1311 else if (update_space (sl, socket, ms, lastcell, 0)) 1314 else if (update_space (sl, socket, ms, lastcell, 0))
1312 mask |= 0x1; 1315 mask |= 0x1;
1313
1314 1316
1315 /* Check to see if we are in fact sending anything for this 1317 /* Check to see if we are in fact sending anything for this
1316 * space by checking the mask. If so, update the mask. 1318 * space by checking the mask. If so, update the mask.
1317 * if not, reset the len to that from before adding the mask 1319 * if not, reset the len to that from before adding the mask
1318 * value, so we don't send those bits. 1320 * value, so we don't send those bits.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines