equal
deleted
inserted
replaced
75 } |
75 } |
76 |
76 |
77 return true; |
77 return true; |
78 } |
78 } |
79 |
79 |
80 #define AI_CHANCE16(a,b) ((uint16) AI_Random() <= (uint16)((65536 * a) / b)) |
80 #define AI_CHANCE16(a, b) ((uint16) AI_Random() <= (uint16)((65536 * a) / b)) |
81 #define AI_CHANCE16R(a,b,r) ((uint16)(r = AI_Random()) <= (uint16)((65536 * a) / b)) |
81 #define AI_CHANCE16R(a, b, r) ((uint16)(r = AI_Random()) <= (uint16)((65536 * a) / b)) |
82 |
82 |
83 /** |
83 /** |
84 * The random-function that should be used by ALL AIs. |
84 * The random-function that should be used by ALL AIs. |
85 */ |
85 */ |
86 static inline uint AI_RandomRange(uint max) |
86 static inline uint AI_RandomRange(uint max) |