示例#1
0
uint32 DoRandom(int line, const char *file)
{
	if (_networking && (!_network_server || (NetworkClientSocket::IsValidID(0) && NetworkClientSocket::Get(0)->status != NetworkClientSocket::STATUS_INACTIVE))) {
		DEBUG(random, 0, "%08x; %02x; %04x; %02x; %s:%d", _date, _date_fract, _frame_counter, (byte)_current_company, file, line);
	}

	return _random.Next();
}
示例#2
0
uint32 DoRandom(int line, const char *file)
{
	if (_networking && (!_network_server || (NetworkClientSocket::IsValidID(0) && NetworkClientSocket::Get(0)->status != STATUS_INACTIVE))) {
		printf("Random [%d/%d] %s:%d\n", _frame_counter, (byte)_current_company, file, line);
	}

	return _random.Next();
}
static FORCEINLINE uint32 InteractiveRandomRange(uint32 max)
{
	return _interactive_random.Next(max);
}
static FORCEINLINE uint32 InteractiveRandom()
{
	return _interactive_random.Next();
}
	static FORCEINLINE uint32 RandomRange(uint32 max)
	{
		return _random.Next(max);
	}
	static FORCEINLINE uint32 Random()
	{
		return _random.Next();
	}
示例#7
0
static inline uint32 InteractiveRandomRange(uint32 max)
{
	return _interactive_random.Next(max);
}
示例#8
0
static inline uint32 InteractiveRandom()
{
	return _interactive_random.Next();
}
示例#9
0
	static inline uint32 RandomRange(uint32 max)
	{
		return _random.Next(max);
	}
示例#10
0
	static inline uint32 Random()
	{
		return _random.Next();
	}
示例#11
0
static inline uint32 InteractiveRandomRange(uint32 limit)
{
	return _interactive_random.Next(limit);
}
示例#12
0
	/**
	 * Pick a random number between 0 and \a limit - 1, inclusive. That means 0
	 * can be returned and \a limit - 1 can be returned, but \a limit can not be
	 * returned.
	 * @param limit Limit for the range to be picked from.
	 * @return A random number in [0,\a limit).
	 */
	static inline uint32 RandomRange(uint32 limit)
	{
		return _random.Next(limit);
	}