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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.213 by root, Fri Dec 26 13:33:22 2008 UTC vs.
Revision 1.214 by root, Sat Dec 27 02:31:19 2008 UTC

950 get_rangevector (op, op->enemy, &rv, 0); 950 get_rangevector (op, op->enemy, &rv, 0);
951 951
952 dir = absdir (4 + rv.direction); 952 dir = absdir (4 + rv.direction);
953 for (diff = 0; diff < 3; diff++) 953 for (diff = 0; diff < 3; diff++)
954 { 954 {
955 int m = 1 - (RANDOM () & 2); 955 int m = 1 - rndm (2) * 2;
956 956
957 if (move_ob (op, absdir (dir + diff * m), op) || (diff == 0 && move_ob (op, absdir (dir - diff * m), op))) 957 if (move_ob (op, absdir (dir + diff * m), op) || (diff == 0 && move_ob (op, absdir (dir - diff * m), op)))
958 return; 958 return;
959 } 959 }
960 960
2483 { 2483 {
2484 over_hp = (gen_hp < 20 ? 30 : gen_hp + 10) / rate_hp; 2484 over_hp = (gen_hp < 20 ? 30 : gen_hp + 10) / rate_hp;
2485 2485
2486 if (over_hp > 0) 2486 if (over_hp > 0)
2487 { 2487 {
2488 op->stats.sp += over_hp + (RANDOM () % rate_hp > ((gen_hp < 20 ? 30 : gen_hp + 10) % rate_hp)) ? -1 : 0; 2488 op->stats.sp += over_hp + (rndm (rate_hp) > ((gen_hp < 20 ? 30 : gen_hp + 10) % rate_hp)) ? -1 : 0;
2489 op->last_heal = 0; 2489 op->last_heal = 0;
2490 } 2490 }
2491 else 2491 else
2492 op->last_heal = rate_hp / (gen_hp < 20 ? 30 : gen_hp + 10); 2492 op->last_heal = rate_hp / (gen_hp < 20 ? 30 : gen_hp + 10);
2493 } 2493 }
2674 2674
2675 lost_a_stat = 0; 2675 lost_a_stat = 0;
2676 2676
2677 for (z = 0; z < num_stats_lose; z++) 2677 for (z = 0; z < num_stats_lose; z++)
2678 { 2678 {
2679 i = RANDOM () % NUM_STATS; 2679 i = rndm (NUM_STATS);
2680 2680
2681 if (settings.stat_loss_on_death) 2681 if (settings.stat_loss_on_death)
2682 { 2682 {
2683 /* Pick a random stat and take a point off it. Tell the player 2683 /* Pick a random stat and take a point off it. Tell the player
2684 * what he lost. 2684 * what he lost.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines