naming wielded weapons
I'm surprised that no one has noticed this one yet. When wielding two weapons, naming either of them caused two-weapon combat mode to stop (unless the weapon already had another name which was long enough to be overwritten by the new name without allocating a replacement object).
This commit is contained in:
@@ -123,6 +123,7 @@ fix crash when using lookat on an known invisible monster with monster syms set
|
|||||||
prevent getting stuck in infinite loop when using wizard mode #levelchange
|
prevent getting stuck in infinite loop when using wizard mode #levelchange
|
||||||
command to reduce level while having level-drain resistance
|
command to reduce level while having level-drain resistance
|
||||||
naming an already wielded elven dagger "Sting" activates warning against orcs
|
naming an already wielded elven dagger "Sting" activates warning against orcs
|
||||||
|
naming either of the wielded weapons unintentionally ends two-weapon combat
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -361,8 +361,12 @@ const char *name;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (obj->owornmask) {
|
if (obj->owornmask) {
|
||||||
|
boolean save_twoweap = u.twoweap;
|
||||||
|
/* unwearing the old instance will clear dual-wield mode
|
||||||
|
if this object is either of the two weapons */
|
||||||
setworn((struct obj *)0, obj->owornmask);
|
setworn((struct obj *)0, obj->owornmask);
|
||||||
setworn(otmp, otmp->owornmask);
|
setworn(otmp, otmp->owornmask);
|
||||||
|
u.twoweap = save_twoweap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* replace obj with otmp */
|
/* replace obj with otmp */
|
||||||
|
|||||||
Reference in New Issue
Block a user