early return when value == 0 on dosacrifice()
`calc_value()` returns a non-negative value, and there is no code that sets `value` to 0 after this point.
This commit is contained in:
@@ -1908,7 +1908,9 @@ dosacrifice(void)
|
||||
value = -1;
|
||||
HAggravate_monster |= FROMOUTSIDE;
|
||||
} else if (!value) {
|
||||
; /* too old; don't give undead or unicorn bonus or penalty */
|
||||
/* too old; don't give undead or unicorn bonus or penalty */
|
||||
pline1(nothing_happens);
|
||||
return ECMD_TIME;
|
||||
} else if (is_undead(ptr)) { /* Not demons--no demon corpses */
|
||||
/* most undead that leave a corpse yield 'human' (or other race)
|
||||
corpse so won't get here; the exception is wraith; give the
|
||||
@@ -1954,11 +1956,6 @@ dosacrifice(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (value == 0) {
|
||||
pline1(nothing_happens);
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
if (altaralign != u.ualign.type && highaltar) {
|
||||
desecrate_altar(highaltar, altaralign);
|
||||
} else if (value < 0) { /* don't think the gods are gonna like this... */
|
||||
|
||||
Reference in New Issue
Block a user