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.102 by root, Sun Jun 3 17:42:39 2007 UTC vs.
Revision 1.105 by root, Wed Jun 6 17:22:55 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.
732static void 731static void
733rangetostring (player *pl, char *obuf) 732rangetostring (player *pl, char *obuf)
734{ 733{
735 dynbuf_text buf; 734 dynbuf_text buf;
736 735
736 if (pl->observe->contr)
737 pl = pl->observe->contr;
738
737 if (pl->ranged_ob) 739 if (pl->ranged_ob)
738 buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name; 740 buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name;
739 741
740 if (pl->combat_ob) 742 if (pl->combat_ob)
741 buf << " Combat" << (pl->ob->current_weapon == pl->combat_ob ? "*" : "") << ": " << pl->combat_ob->name; 743 buf << " Combat" << (pl->ob->current_weapon == pl->combat_ob ? "*" : "") << ": " << pl->combat_ob->name;
742 744
745#if 0
743 //TODO: remove this when slot system is working, this is only for debugging 746 //TODO: remove this when slot system is working, this is only for debugging
744 if (pl->ob->chosen_skill) 747 if (pl->ob->chosen_skill)
745 buf << " Skill*: " << pl->ob->chosen_skill->name; 748 buf << " Skill*: " << pl->ob->chosen_skill->name;
749#endif
746 750
747 //TODO: maybe golem should become the current_weapon, quite simply? 751 //TODO: maybe golem should become the current_weapon, quite simply?
748 if (pl->golem) 752 if (pl->golem)
749 buf << " Golem*: " << pl->golem->name; 753 buf << " Golem*: " << pl->golem->name;
750 754
1232 || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR)) 1236 || QUERY_FLAG (op, FLAG_MONSTER) || QUERY_FLAG (op, FLAG_ALIVE) || QUERY_FLAG (op, FLAG_GENERATOR))
1233 { 1237 {
1234 if (op->stats.maxhp > 0 && (unsigned) op->stats.maxhp > (unsigned) op->stats.hp) 1238 if (op->stats.maxhp > 0 && (unsigned) op->stats.maxhp > (unsigned) op->stats.hp)
1235 { 1239 {
1236 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp; 1240 stat_hp = 255 - (op->stats.hp * 255 + 254) / op->stats.maxhp;
1237 stat_width = op->arch->tail_x; 1241 stat_width = op->arch->max_x - op->arch->x; //TODO: should be upper-left edge
1238 } 1242 }
1239 } 1243 }
1240 1244
1241 if (op->msg && op->msg[0] == '@') 1245 if (op->msg && op->msg[0] == '@')
1242 flags |= 1; 1246 flags |= 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines