From 9e213d3bcd1c4b66b4aa2444166e223795a7168d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 26 May 2017 19:05:46 +0200 Subject: [PATCH] minor optimization and using fraction code --- s/install | 5 ----- src/magic.c | 2 +- src/reports.c | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/s/install b/s/install index 962961063..27cf185af 100755 --- a/s/install +++ b/s/install @@ -16,8 +16,3 @@ BIN_DIR="Debug" cd $ROOT/$BIN_DIR make install - -# install crontab, but only on the eressea server: -# in fact, never do this, because it overwrites hand-edits -#WHOAMI=`whoami`@`hostname` -#[ "eressea@gruenbaer" = "$WHOAMI" ] && crontab $ROOT/process/cron/crontab diff --git a/src/magic.c b/src/magic.c index a20fbc477..81a797e1c 100644 --- a/src/magic.c +++ b/src/magic.c @@ -1107,7 +1107,7 @@ variant magic_resistance(unit * target) const plane *pl = rplane(target->region); if (rc == get_race(RC_HIRNTOETER) && !pl) { - prob.sa[1] *= 2; + prob = frac_mul(prob, frac_make(1, 2)); } assert(target->number > 0); /* Magier haben einen Resistenzbonus vom Magietalent * 5% */ diff --git a/src/reports.c b/src/reports.c index 9af18c1d2..ba0302c6c 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1221,7 +1221,7 @@ static void add_seen_nb(faction *f, region *r, seen_mode mode) { for (d = 0; d != MAXDIRECTIONS; ++d) { region *rn = next[d]; if (rn && rn->seen.modeseen.mode = seen_neighbour; if (first->index>rn->index) first = rn; if (last->indexindex) last = rn; }