mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Use the logger; also, default to not showing much crap in console. Use --info-on-stderr to enable crap.
This commit is contained in:
parent
4846846a2d
commit
b65a5aceb0
16 changed files with 844 additions and 646 deletions
|
@ -1230,20 +1230,7 @@ int myrand(void);
|
|||
void mysrand(unsigned seed);
|
||||
#define MYRAND_MAX 32767
|
||||
|
||||
inline int myrand_range(int min, int max)
|
||||
{
|
||||
if(max-min > MYRAND_MAX)
|
||||
{
|
||||
dstream<<"WARNING: myrand_range: max-min > MYRAND_MAX"<<std::endl;
|
||||
assert(0);
|
||||
}
|
||||
if(min > max)
|
||||
{
|
||||
assert(0);
|
||||
return max;
|
||||
}
|
||||
return (myrand()%(max-min+1))+min;
|
||||
}
|
||||
int myrand_range(int min, int max);
|
||||
|
||||
/*
|
||||
Miscellaneous functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue