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.173 by root, Thu Apr 15 00:37:24 2010 UTC vs.
Revision 1.174 by root, Thu Apr 15 00:40:34 2010 UTC

711 * commands for now. 711 * commands for now.
712 */ 712 */
713void 713void
714esrv_update_stats (player *pl) 714esrv_update_stats (player *pl)
715{ 715{
716 char buf[MAX_BUF];
717 uint16 flags;
718
719 client *ns = pl->ns; 716 client *ns = pl->ns;
720 if (!ns) 717 if (!ns)
721 return; 718 return;
722 719
723 object *ob = pl->observe; 720 object *ob = pl->observe;
764 AddIfFloat (ns->last_speed, ob->speed, CS_STAT_SPEED, 1.f / TICK); 761 AddIfFloat (ns->last_speed, ob->speed, CS_STAT_SPEED, 1.f / TICK);
765 AddIfShort (ns->last_stats.food, ob->stats.food, CS_STAT_FOOD); 762 AddIfShort (ns->last_stats.food, ob->stats.food, CS_STAT_FOOD);
766 AddIfFloat (ns->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP, 1.f / TICK); 763 AddIfFloat (ns->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP, 1.f / TICK);
767 AddIfInt (ns->last_weight_limit, weight_limit[ob->stats.Str], CS_STAT_WEIGHT_LIM); 764 AddIfInt (ns->last_weight_limit, weight_limit[ob->stats.Str], CS_STAT_WEIGHT_LIM);
768 765
769 flags = (opl->fire_on ? SF_FIREON : 0) 766 int flags = (opl->fire_on ? SF_FIREON : 0)
770 | (opl->run_on ? SF_RUNON : 0); 767 | (opl->run_on ? SF_RUNON : 0);
771 768
772 AddIfShort (ns->last_flags, flags, CS_STAT_FLAGS); 769 AddIfShort (ns->last_flags, flags, CS_STAT_FLAGS);
773 770
774 for (int i = 0; i < NROFATTACKS; i++) 771 for (int i = 0; i < NROFATTACKS; i++)
775 /* Skip ones we won't send */ 772 /* Skip ones we won't send */
781 AddIfInt (ns->last_path_attuned, ob->path_attuned, CS_STAT_SPELL_ATTUNE); 778 AddIfInt (ns->last_path_attuned, ob->path_attuned, CS_STAT_SPELL_ATTUNE);
782 AddIfInt (ns->last_path_repelled, ob->path_repelled, CS_STAT_SPELL_REPEL); 779 AddIfInt (ns->last_path_repelled, ob->path_repelled, CS_STAT_SPELL_REPEL);
783 AddIfInt (ns->last_path_denied, ob->path_denied, CS_STAT_SPELL_DENY); 780 AddIfInt (ns->last_path_denied, ob->path_denied, CS_STAT_SPELL_DENY);
784 } 781 }
785 782
783 char buf[MAX_BUF];
786 rangetostring (opl, buf); /* we want use the new fire & run system in new client */ 784 rangetostring (opl, buf); /* we want use the new fire & run system in new client */
787 AddIfString (ns->stats.range, buf, CS_STAT_RANGE); 785 AddIfString (ns->stats.range, buf, CS_STAT_RANGE);
788 set_title (ob, buf); 786 set_title (ob, buf);
789 AddIfString (ns->stats.title, buf, CS_STAT_TITLE); 787 AddIfString (ns->stats.title, buf, CS_STAT_TITLE);
790 788

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines