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

removed function fixdir

This commit is contained in:
Zeno Rogue
2019-08-09 14:39:21 +02:00
parent b57c4c8d4e
commit f4eda1d76e
7 changed files with 14 additions and 17 deletions

View File

@@ -142,13 +142,13 @@ void calcMousedest() {
for(int i=0; i<cwt.at->type; i++) if(dists[i] < mousedist) {
mousedist = dists[i];
mousedest.d = fixdir(i - cwt.spin, cwt.at);
mousedest.d = cwt.at->c.fix(i - cwt.spin);
mousedest.subdir =
dists[(i+1)%cwt.at->type] < dists[(i+cwt.at->type-1)%cwt.at->type] ? 1 : -1;
dists[cwt.at->c.fix(i+1)] < dists[cwt.at->c.fix(i-1)] ? 1 : -1;
if(cwt.mirrored)
mousedest.d = fixdir(-mousedest.d, cwt.at),
mousedest.d = cwt.at->c.fix(-mousedest.d),
mousedest.subdir = -mousedest.subdir;
}