mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-10 17:54:31 +00:00
3d:: fixed pushing directions
This commit is contained in:
1 parent
71ef823c43
commit
42e4342c4a
5 files changed
+24
-5
No files matched your search
@@ -4163,6 +4163,16 @@ cell *determinePush(cellwalker who, cell *c2, int subdir, const T& valid, int& p
|
||||
}
|
||||
cellwalker push = who;
|
||||
push += wstep;
|
||||
if(DIM == 3 && binarytiling) {
|
||||
for(int a=0; a<4; a++) {
|
||||
if(push.spin < 4) push.spin = 8;
|
||||
else if(push.spin >= 8) push.spin = a;
|
||||
else push.spin ^= 1;
|
||||
push += wstep;
|
||||
if(valid(push.at)) return push.at;
|
||||
}
|
||||
return c2;
|
||||
}
|
||||
int pd = push.at->type/2;
|
||||
push += pd * -subdir;
|
||||
push += wstep;
|
||||
|
||||
Reference in new issue
Block a user