lit candles generated by wishing could have wrong light radius
begin_burn() was called before the quantity of wished lit candles was restricted which meant that the light source radius could depend on a larger quantity than the final object actually had.
This commit is contained in:
@@ -1016,6 +1016,7 @@ monsters which cannot move due to boulders or walls try to escape
|
|||||||
intelligent monsters see and remember when others trigger traps
|
intelligent monsters see and remember when others trigger traps
|
||||||
random figurines are of harder monsters
|
random figurines are of harder monsters
|
||||||
monsters can blind you with a camera
|
monsters can blind you with a camera
|
||||||
|
lit candles generated by wishing could have wrong light radius
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
+8
-8
@@ -4590,14 +4590,6 @@ readobjnam(char *bp, struct obj *no_wish)
|
|||||||
d.otmp = d.typ ? mksobj(d.typ, TRUE, FALSE) : mkobj(d.oclass, FALSE);
|
d.otmp = d.typ ? mksobj(d.typ, TRUE, FALSE) : mkobj(d.oclass, FALSE);
|
||||||
d.typ = d.otmp->otyp, d.oclass = d.otmp->oclass; /* what we actually got */
|
d.typ = d.otmp->otyp, d.oclass = d.otmp->oclass; /* what we actually got */
|
||||||
|
|
||||||
if (d.islit && (d.typ == OIL_LAMP || d.typ == MAGIC_LAMP
|
|
||||||
|| d.typ == BRASS_LANTERN
|
|
||||||
|| Is_candle(d.otmp) || d.typ == POT_OIL)) {
|
|
||||||
place_object(d.otmp, u.ux, u.uy); /* make it viable light source */
|
|
||||||
begin_burn(d.otmp, FALSE);
|
|
||||||
obj_extract_self(d.otmp); /* now release it for caller's use */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if player specified a reasonable count, maybe honor it;
|
/* if player specified a reasonable count, maybe honor it;
|
||||||
quantity for gold is handled elsewhere and d.cnt is 0 for it here */
|
quantity for gold is handled elsewhere and d.cnt is 0 for it here */
|
||||||
if (d.otmp->globby) {
|
if (d.otmp->globby) {
|
||||||
@@ -4644,6 +4636,14 @@ readobjnam(char *bp, struct obj *no_wish)
|
|||||||
d.otmp->quan = (long) d.cnt;
|
d.otmp->quan = (long) d.cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d.islit && (d.typ == OIL_LAMP || d.typ == MAGIC_LAMP
|
||||||
|
|| d.typ == BRASS_LANTERN
|
||||||
|
|| Is_candle(d.otmp) || d.typ == POT_OIL)) {
|
||||||
|
place_object(d.otmp, u.ux, u.uy); /* make it viable light source */
|
||||||
|
begin_burn(d.otmp, FALSE);
|
||||||
|
obj_extract_self(d.otmp); /* now release it for caller's use */
|
||||||
|
}
|
||||||
|
|
||||||
if (d.spesgn == 0) {
|
if (d.spesgn == 0) {
|
||||||
/* spe not specifed; retain the randomly assigned value */
|
/* spe not specifed; retain the randomly assigned value */
|
||||||
d.spe = d.otmp->spe;
|
d.spe = d.otmp->spe;
|
||||||
|
|||||||
Reference in New Issue
Block a user