1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

unambiguous sword in non-{4,3,*} 3D geometreis

This commit is contained in:
Zeno Rogue 2019-06-25 10:05:39 +02:00
parent eb4156fe29
commit 5d88c1706a
2 changed files with 15 additions and 5 deletions

View File

@ -2709,10 +2709,22 @@ namespace sword {
} }
return d; return d;
} }
transmatrix initial_matrix() {
if(S7 == 6) return Id;
return cspin(0, 1, 0.1) * cspin(0, 2, 0.1) * cspin(1, 2, 0.1) * Id;
}
sworddir initial(cell *c) {
sworddir res;
res.angle = (sword::sword_angles / cwt.at->type + 1) / 2;
if(WDIM == 3) res.T = initial_matrix();
return res;
}
void shuffle(int i) { void shuffle(int i) {
dir[i].angle = hrand(sword_angles); dir[i].angle = hrand(sword_angles);
dir[i].T = Id; if(WDIM == 3) dir[i].T = initial_matrix();
} }
void reset() { void reset() {

View File

@ -210,10 +210,8 @@ void initgame() {
} }
sword::determine_sword_angles(); sword::determine_sword_angles();
for(int i=0; i<numplayers(); i++) { for(int i=0; i<numplayers(); i++)
sword::dir[i].angle = (sword::sword_angles / cwt.at->type + 1) / 2; sword::dir[i] = sword::initial(cwt.at);
sword::dir[i].T = Id;
}
#if CAP_DAILY #if CAP_DAILY
daily::split(); daily::split();