minor optimization and using fraction code

This commit is contained in:
Enno Rehling 2017-05-26 19:05:46 +02:00
parent a3ebddeae4
commit 9e213d3bcd
3 changed files with 2 additions and 7 deletions

View File

@ -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

View File

@ -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% */

View File

@ -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.mode<seen_neighbour) {
add_seen(rn, seen_neighbour);
rn->seen.mode = seen_neighbour;
if (first->index>rn->index) first = rn;
if (last->index<rn->index) last = rn;
}