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.97 by root, Thu May 17 14:14:56 2007 UTC vs.
Revision 1.99 by root, Tue May 22 10:50:01 2007 UTC

740 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;
741 741
742 if (pl->combat_ob) 742 if (pl->combat_ob)
743 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;
744 744
745 //TODO: remove this when slot system is working, this is only for debugging
746 if (pl->ob->chosen_skill)
747 buf << " Skill*: " << pl->ob->chosen_skill->name;
748
745 //TODO: maybe golem should become the current_weapon, quite simply? 749 //TODO: maybe golem should become the current_weapon, quite simply?
746 if (pl->golem) 750 if (pl->golem)
747 buf << " Golem*: " << pl->golem->name; 751 buf << " Golem*: " << pl->golem->name;
748 752
749 buf.linearise (obuf); 753 buf.linearise (obuf);
763#define AddIfShort(Old,New,Type) if (Old != New) {\ 767#define AddIfShort(Old,New,Type) if (Old != New) {\
764 Old = New; \ 768 Old = New; \
765 sl << uint8 (Type) << uint16 (New); \ 769 sl << uint8 (Type) << uint16 (New); \
766 } 770 }
767 771
768#define AddIfFloat(Old,New,Type) if (Old != New) {\ 772#define AddIfFloat(Old,New,Type,mult) if (Old != New) {\
769 Old = New; \ 773 Old = New; \
770 sl << uint8 (Type) << uint32 (New*FLOAT_MULTI); \ 774 sl << uint8 (Type) << uint32 (New*FLOAT_MULTI*mult); \
771 } 775 }
772 776
773#define AddIfString(Old,New,Type) if (Old == NULL || strcmp(Old,New)) {\ 777#define AddIfString(Old,New,Type) if (Old == NULL || strcmp(Old,New)) {\
774 free(Old); Old = strdup (New);\ 778 free(Old); Old = strdup (New);\
775 sl << uint8 (Type) << data8 (New); \ 779 sl << uint8 (Type) << data8 (New); \
828 AddIfInt64 (ns->last_stats.exp, ob->stats.exp, CS_STAT_EXP64); 832 AddIfInt64 (ns->last_stats.exp, ob->stats.exp, CS_STAT_EXP64);
829 AddIfShort (ns->last_level, ob->level, CS_STAT_LEVEL); 833 AddIfShort (ns->last_level, ob->level, CS_STAT_LEVEL);
830 AddIfShort (ns->last_stats.wc, ob->stats.wc, CS_STAT_WC); 834 AddIfShort (ns->last_stats.wc, ob->stats.wc, CS_STAT_WC);
831 AddIfShort (ns->last_stats.ac, ob->stats.ac, CS_STAT_AC); 835 AddIfShort (ns->last_stats.ac, ob->stats.ac, CS_STAT_AC);
832 AddIfShort (ns->last_stats.dam, ob->stats.dam, CS_STAT_DAM); 836 AddIfShort (ns->last_stats.dam, ob->stats.dam, CS_STAT_DAM);
833 AddIfFloat (ns->last_speed, ob->speed, CS_STAT_SPEED); 837 AddIfFloat (ns->last_speed, ob->speed, CS_STAT_SPEED, 1.f/TICK);
834 AddIfShort (ns->last_stats.food, ob->stats.food, CS_STAT_FOOD); 838 AddIfShort (ns->last_stats.food, ob->stats.food, CS_STAT_FOOD);
835 AddIfFloat (ns->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP); 839 AddIfFloat (ns->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP, 1.f/TICK);
836 AddIfInt (ns->last_weight_limit, weight_limit[ob->stats.Str], CS_STAT_WEIGHT_LIM); 840 AddIfInt (ns->last_weight_limit, weight_limit[ob->stats.Str], CS_STAT_WEIGHT_LIM);
837 841
838 flags = 0; 842 flags = 0;
839 843
840 if (pl->fire_on) 844 if (pl->fire_on)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines