ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/living.C
(Generate patch)

Comparing deliantra/server/common/living.C (file contents):
Revision 1.84 by root, Fri May 2 20:24:48 2008 UTC vs.
Revision 1.87 by root, Tue May 6 17:31:21 2008 UTC

400 /* MOVE_FLY_HIGH trumps MOVE_FLY_LOW - changing your move_fly_low 400 /* MOVE_FLY_HIGH trumps MOVE_FLY_LOW - changing your move_fly_low
401 * status doesn't make a difference if you are flying high 401 * status doesn't make a difference if you are flying high
402 */ 402 */
403 if (tmp->move_type & MOVE_FLY_LOW && !(op->move_type & MOVE_FLY_HIGH)) 403 if (tmp->move_type & MOVE_FLY_LOW && !(op->move_type & MOVE_FLY_HIGH))
404 { 404 {
405 DIFF_MSG (flag, "You start to float in the air!.", "You float down to the ground."); 405 DIFF_MSG (flag, "You start to float in the air!", "You float down to the ground.");
406 } 406 }
407 407
408 if (tmp->move_type & MOVE_FLY_HIGH) 408 if (tmp->move_type & MOVE_FLY_HIGH)
409 { 409 {
410 /* double conditional - second case covers if you have move_fly_low - 410 /* double conditional - second case covers if you have move_fly_low -
861 continue; 861 continue;
862 862
863 /* See note in map.c:update_position about making this additive 863 /* See note in map.c:update_position about making this additive
864 * since light sources are never applied, need to put check here. 864 * since light sources are never applied, need to put check here.
865 */ 865 */
866 if (tmp->glow_radius > glow_radius)
867 glow_radius = tmp->glow_radius; 866 glow_radius = max (glow_radius, tmp->glow_radius);
868 867
869 /* For some things, we don't care what is equipped */ 868 /* For some things, we don't care what is equipped */
870 if (tmp->type == SKILL) 869 if (tmp->type == SKILL)
871 { 870 {
872 /* Want to take the highest skill here. */ 871 /* Want to take the highest skill here. */
885 else if (tmp->level > grace_obj->level) 884 else if (tmp->level > grace_obj->level)
886 grace_obj = tmp; 885 grace_obj = tmp;
887 } 886 }
888 } 887 }
889 888
890 /* Container objects are not meant to adjust a players, but other applied 889 /* Container objects are not meant to adjust players, but other applied
891 * objects need to make adjustments. 890 * objects need to make adjustments.
892 * This block should handle all player specific changes 891 * This block should handle all player specific changes
893 * The check for Praying is a bit of a hack - god given bonuses are put 892 * The check for Praying is a bit of a hack - god given bonuses are put
894 * in the praying skill, and the player should always get those. 893 * in the praying skill, and the player should always get those.
895 * It also means we need to put in additional checks for applied below, 894 * It also means we need to put in additional checks for applied below,
918 917
919 if (digest_types [tmp->type]) 918 if (digest_types [tmp->type])
920 { 919 {
921 contr->digestion += tmp->stats.food; 920 contr->digestion += tmp->stats.food;
922 contr->gen_hp += tmp->stats.hp; 921 contr->gen_hp += tmp->stats.hp;
922 if (tmp->type != BOW) // ugly exception for bows
923 contr->gen_sp += tmp->stats.sp; 923 contr->gen_sp += tmp->stats.sp;
924 contr->gen_grace += tmp->stats.grace; 924 contr->gen_grace += tmp->stats.grace;
925 contr->gen_sp_armour += tmp->gen_sp_armour; 925 contr->gen_sp_armour += tmp->gen_sp_armour;
926 } 926 }
927 } /* if this is a player */ 927 } /* if this is a player */
928 else 928 else
938 938
939 if (tmp->type == SYMPTOM) 939 if (tmp->type == SYMPTOM)
940 speed_reduce_from_disease = 940 speed_reduce_from_disease =
941 min (speed_reduce_from_disease, tmp->last_sp ? tmp->last_sp / 100.f : 1.f); 941 min (speed_reduce_from_disease, tmp->last_sp ? tmp->last_sp / 100.f : 1.f);
942 942
943 /* Pos. and neg. protections are counted seperate (-> pro/vuln). 943 /* Pos. and neg. protections are counted separate (-> pro/vuln).
944 * (Negative protections are calculated exactly like positive.) 944 * (Negative protections are calculated exactly like positive.)
945 * Resistance from potions are treated special as well. If there's 945 * Resistance from potions are treated special as well. If there's
946 * more than one potion-effect, the bigger prot.-value is taken. 946 * more than one potion-effect, the bigger prot.-value is taken.
947 */ 947 */
948 if (tmp->type != POTION) 948 if (tmp->type != POTION)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines