refine blocked levitation/flight (trunk only)
Levitation side-effects get skipped if Levitation toggles while it is blocked, so BFlying (the reason Flying is blocked) could become stale in some situations. Enlightment feedback about latent flight capability was the only thing affected.
This commit is contained in:
@@ -88,11 +88,8 @@ set_uasmon()
|
||||
PROPSET(PASSES_WALLS, passes_walls(mdat));
|
||||
PROPSET(REGENERATION, regenerates(mdat));
|
||||
PROPSET(REFLECTING, (mdat == &mons[PM_SILVER_DRAGON]));
|
||||
/* levitation overrides flight */
|
||||
if (HLevitation || ELevitation)
|
||||
BFlying |= I_SPECIAL;
|
||||
else
|
||||
BFlying &= ~I_SPECIAL;
|
||||
|
||||
float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
|
||||
|
||||
#undef PROPSET
|
||||
|
||||
@@ -101,6 +98,18 @@ set_uasmon()
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Levitation overrides Flying; set or clear BFlying|I_SPECIAL */
|
||||
void
|
||||
float_vs_flight()
|
||||
{
|
||||
/* floating overrides flight; normally float_up() and float_down()
|
||||
handle this, but sometimes they're skipped */
|
||||
if (HLevitation || ELevitation)
|
||||
BFlying |= I_SPECIAL;
|
||||
else
|
||||
BFlying &= ~I_SPECIAL;
|
||||
}
|
||||
|
||||
/* for changing into form that's immune to strangulation */
|
||||
STATIC_OVL void
|
||||
check_strangling(on)
|
||||
|
||||
Reference in New Issue
Block a user