1
0
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:
Zeno Rogue 2019-04-22 23:00:10 +02:00
parent 49877fbfc9
commit edbf08b80c

View File

@ -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;