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.97 by root, Mon Jan 8 22:32:11 2007 UTC vs.
Revision 1.99 by root, Thu Jan 18 19:42:10 2007 UTC

194 return; 194 return;
195 195
196 terminate_all_pets (ob); 196 terminate_all_pets (ob);
197 remove_friendly_object (ob); 197 remove_friendly_object (ob);
198 ob->deactivate_recursive (); 198 ob->deactivate_recursive ();
199 maplevel = ob->map->path;
199 ob->remove (); 200 ob->remove ();
200 ob->map = 0; 201 ob->map = 0;
201 202
202 // for weird reasons, this is often "ob", keeping a circular reference 203 // for weird reasons, this is often "ob", keeping a circular reference
203 ranges [range_skill] = 0; 204 ranges [range_skill] = 0;
755roll_stat (void) 756roll_stat (void)
756{ 757{
757 int a[4], i, j, k; 758 int a[4], i, j, k;
758 759
759 for (i = 0; i < 4; i++) 760 for (i = 0; i < 4; i++)
760 a[i] = (int) RANDOM () % 6 + 1; 761 a[i] = (int) rndm (6) + 1;
761 762
762 for (i = 0, j = 0, k = 7; i < 4; i++) 763 for (i = 0, j = 0, k = 7; i < 4; i++)
763 if (a[i] < k) 764 if (a[i] < k)
764 k = a[i], j = i; 765 k = a[i], j = i;
765 766
2210 return 0; 2211 return 0;
2211 } 2212 }
2212 2213
2213 /* peterm: added following line */ 2214 /* peterm: added following line */
2214 if (QUERY_FLAG (op, FLAG_CONFUSED) && dir) 2215 if (QUERY_FLAG (op, FLAG_CONFUSED) && dir)
2215 dir = absdir (dir + RANDOM () % 3 + RANDOM () % 3 - 2); 2216 dir = absdir (dir + rndm (3) + rndm (3) - 2);
2216 2217
2217 op->facing = dir; 2218 op->facing = dir;
2218 2219
2219 if (op->hide) 2220 if (op->hide)
2220 do_hidden_move (op); 2221 do_hidden_move (op);
2981 tmp->x = op->x, tmp->y = op->y; 2982 tmp->x = op->x, tmp->y = op->y;
2982 if (tmp->type == CONTAINER) 2983 if (tmp->type == CONTAINER)
2983 { /* empty container to ground */ 2984 { /* empty container to ground */
2984 loot_object (tmp); 2985 loot_object (tmp);
2985 } 2986 }
2986 if (!QUERY_FLAG (tmp, FLAG_UNIQUE) && (QUERY_FLAG (tmp, FLAG_STARTEQUIP) || QUERY_FLAG (tmp, FLAG_NO_DROP) || !(RANDOM () % 3))) 2987 if (!QUERY_FLAG (tmp, FLAG_UNIQUE) && (QUERY_FLAG (tmp, FLAG_STARTEQUIP) || QUERY_FLAG (tmp, FLAG_NO_DROP) || !(rndm (3))))
2987 { 2988 {
2988 if (tmp->nrof > 1) 2989 if (tmp->nrof > 1)
2989 { 2990 {
2990 tmp2 = get_split_ob (tmp, 1 + RANDOM () % (tmp->nrof - 1)); 2991 tmp2 = get_split_ob (tmp, 1 + RANDOM () % (tmp->nrof - 1));
2991 tmp2->destroy (); 2992 tmp2->destroy ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines