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

Comparing deliantra/server/common/utils.C (file contents):
Revision 1.17 by root, Fri Nov 17 19:40:53 2006 UTC vs.
Revision 1.21 by root, Tue Dec 12 20:53:02 2006 UTC

97 diff = max - min + 1; 97 diff = max - min + 1;
98 ((diff > 2) ? (base = 20) : (base = 50)); /* d2 and d3 are corner cases */ 98 ((diff > 2) ? (base = 20) : (base = 50)); /* d2 and d3 are corner cases */
99 99
100 if (max < 1 || diff < 1) 100 if (max < 1 || diff < 1)
101 { 101 {
102#ifndef WIN32
103 LOG (llevError, "Calling random_roll with min=%lld max=%lld\n", min, max);
104#else
105 LOG (llevError, "Calling random_roll with min=%I64d max=%I64d\n", min, max); 102 LOG (llevError, "Calling random_roll with min=%" PRId64 " max=%" PRId64 "\n", min, max);
106#endif
107 return (min); /* avoids a float exception */ 103 return (min); /* avoids a float exception */
108 } 104 }
109 105
110 /* Don't know of a portable call to get 64 bit random values. 106 /* Don't know of a portable call to get 64 bit random values.
111 * So make a call to get two 32 bit random numbers, and just to 107 * So make a call to get two 32 bit random numbers, and just to
259 destroy = 1; 255 destroy = 1;
260 } 256 }
261 /* adjust overall chance below */ 257 /* adjust overall chance below */
262 if (destroy && rndm (0, 1)) 258 if (destroy && rndm (0, 1))
263 { 259 {
264 remove_ob (op); 260 op->remove ();
265 free_object (op); 261 op->destroy (0);
266 } 262 }
267 } 263 }
268} 264}
269 265
270/* convert materialname to materialtype_t */ 266/* convert materialname to materialtype_t */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines