1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-31 01:37:57 +00:00

fixed crashes caused by missing rev_dir

This commit is contained in:
Zeno Rogue
2020-12-25 06:07:30 +01:00
parent f2e9b371ff
commit e13172f9ab
4 changed files with 9 additions and 6 deletions

View File

@@ -1211,7 +1211,7 @@ EX void stabbingAttack(movei mi, eMonster who, int bonuskill IS(0)) {
cell *mf = mi.s;
cell *mt = mi.t;
int backdir = mi.rev_dir();
int backdir = mi.rev_dir_mirror();
do_swords(mi, who, [&] (cell *c, int bb) { if(swordAttack(mt, who, c, bb)) numbb[bb]++, numslash++; });
@@ -1279,7 +1279,7 @@ EX void stabbingAttack(movei mi, eMonster who, int bonuskill IS(0)) {
if(!logical_adjacent(mt, who, c)) continue;
eMonster mm = c->monst;
int flag = AF_APPROACH;
if(anglestraight(mt, backdir, t)) flag |= AF_HORNS;
if(proper(mt, backdir) && anglestraight(mt, backdir, t)) flag |= AF_HORNS;
if(canAttack(mt,who,c,c->monst, flag)) {
changes.ccell(c);
if(attackMonster(c, flag | AF_MSG, who)) numlance++;