walker now automatically fixes spin

This commit is contained in:
Zeno Rogue 2019-08-09 14:38:55 +02:00
parent 661743a19b
commit b57c4c8d4e
1 changed files with 1 additions and 1 deletions

View File

@ -635,7 +635,7 @@ template<class T> struct walker {
T *at;
int spin;
bool mirrored;
walker<T> (T *at = NULL, int s = 0, bool m = false) : at(at), spin(s), mirrored(m) { }
walker<T> (T *at = NULL, int s = 0, bool m = false) : at(at), spin(s), mirrored(m) { if(at) s = at->c.fix(s); }
walker<T>& operator += (int i) {
spin = at->c.fix(spin+(mirrored?-i:i));
return (*this);