mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-26 01:50:36 +00:00
disabled color perturb if color not applicable
This commit is contained in:
parent
49877fbfc9
commit
edbf08b80c
@ -93,8 +93,9 @@ void buildhue() {
|
||||
|
||||
int perturb(int c) {
|
||||
if(nh == 0) buildhue();
|
||||
int hueid = 0;
|
||||
int hueid = -1;
|
||||
for(int t=0; t<nh; t++) if(hues[t] == c) hueid = t;
|
||||
if(hueid == -1) return c;
|
||||
hueid += rand() % 50;
|
||||
hueid -= rand() % 50;
|
||||
if(hueid<0) hueid += nh;
|
||||
|
Loading…
Reference in New Issue
Block a user