there is no NEWATSROI, remove dead code

This commit is contained in:
Enno Rehling 2017-02-12 18:52:41 +01:00
parent b05c2564e5
commit 4828045fd7
2 changed files with 1 additions and 28 deletions

View File

@ -227,7 +227,7 @@ static bool can_give_men(const unit *u, const unit *dst, order *ord, message **m
if (unit_has_cursed_item(u)) { if (unit_has_cursed_item(u)) {
if (msg) *msg = msg_error(u, ord, 78); if (msg) *msg = msg_error(u, ord, 78);
} }
else if (dst && (has_skill(u, SK_MAGIC) && dst->number > 0)) { else if (has_skill(u, SK_MAGIC)) {
/* cannot give units to and from magicians */ /* cannot give units to and from magicians */
if (msg) *msg = msg_error(u, ord, 158); if (msg) *msg = msg_error(u, ord, 158);
} }

View File

@ -1245,24 +1245,6 @@ static int item_invis(const unit *u) {
+ (rsphere ? i_get(u->items, rsphere->itype) * 100 : 0); + (rsphere ? i_get(u->items, rsphere->itype) * 100 : 0);
} }
#ifdef NEWATSROI
static int item_modification(const unit * u, skill_t sk, int val)
{
if (sk == SK_STEALTH) {
if (item_invis(u) >= u->number) {
val += ROIBONUS;
}
}
if (sk == SK_PERCEPTION) {
const struct resource_type *rtype = get_resourcetype(R_AMULET_OF_TRUE_SEEING);
if (i_get(u->items, rtype->itype) >= u->number) {
val += ATSBONUS;
}
}
return val;
}
#endif
static int att_modification(const unit * u, skill_t sk) static int att_modification(const unit * u, skill_t sk)
{ {
double result = 0; double result = 0;
@ -1335,11 +1317,6 @@ int get_modifier(const unit * u, skill_t sk, int level, const region * r, bool n
skill += rc_skillmod(u_race(u), r, sk); skill += rc_skillmod(u_race(u), r, sk);
skill += att_modification(u, sk); skill += att_modification(u, sk);
#ifdef NEWATSROI
if (!noitem) {
skill = item_modification(u, sk, skill);
}
#endif
skill = skillmod(u->attribs, u, r, sk, skill, SMF_ALWAYS); skill = skillmod(u->attribs, u, r, sk, skill, SMF_ALWAYS);
if (fval(u, UFL_HUNGER)) { if (fval(u, UFL_HUNGER)) {
@ -1382,9 +1359,6 @@ int effskill_study(const unit * u, skill_t sk, const region * r)
int invisible(const unit * target, const unit * viewer) int invisible(const unit * target, const unit * viewer)
{ {
#ifdef NEWATSROI
return 0;
#else
if (viewer && viewer->faction == target->faction) if (viewer && viewer->faction == target->faction)
return 0; return 0;
else { else {
@ -1398,7 +1372,6 @@ int invisible(const unit * target, const unit * viewer)
} }
return hidden; return hidden;
} }
#endif
} }
/** remove the unit from memory. /** remove the unit from memory.