1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

fixed a Snake-related bug

This commit is contained in:
Zeno Rogue 2018-01-11 23:16:50 +01:00
parent 9c8b16e9d0
commit 6acd227e27

View File

@ -4558,7 +4558,10 @@ int inpair(cell *c, int colorpair) {
}
int snake_pair(cell *c) {
return (1 << pattern_threecolor(c)) | (1 << pattern_threecolor(c->mov[c->mondir]));
if(c->mondir == NODIR)
return (1 << pattern_threecolor(c));
else
return (1 << pattern_threecolor(c)) | (1 << pattern_threecolor(c->mov[c->mondir]));
}
// note: move from 'c' to 'from'!