1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 07:27:40 +00:00

sword:: removed the dependence on the S* constants

This commit is contained in:
?
2019-02-26 14:10:23 +01:00
committed by Zeno Rogue
parent f37c8d2f1c
commit 111bc3697d
4 changed files with 19 additions and 17 deletions

View File

@@ -5256,8 +5256,8 @@ void sideAttack(cell *mf, int dir, eMonster who, int bonuskill) {
template<class T> void do_swords(cell *mf, cell *mt, eMonster who, const T& f) {
for(int bb=0; bb<2; bb++) if(who == moPlayer && sword::orbcount(bb)) {
cell *sf = sword::pos(mf, sword::angle[multi::cpid] + (bb?S21:0));
cell *st = sword::pos(mt, sword::shift(mf, mt, sword::angle[multi::cpid]) + (bb?S21:0));
cell *sf = sword::pos(mf, sword::angle[multi::cpid] + (bb?sword_angles/2:0));
cell *st = sword::pos(mt, sword::shift(mf, mt, sword::angle[multi::cpid]) + (bb?sword_angles/2:0));
f(st, bb);
if(sf != st && !isNeighbor(sf,st)) {
// also attack the in-transit cell