Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: fix_player() fixes
- To: crossfire (at) ifi.uio.no
- Subject: CF: fix_player() fixes
- From: Jan Echternach <>
- Date: Tue, 13 Jun 2000 16:35:08 +0200
- Mail-Followup-To:
- Reply-To: Jan Echternach <>
- Sender:
Hi,
fix_player() cleared some flags even if they were set in the archetype.
The attached patch fixes monsters like Arch Angel, High guard and
dancing sword.
It's also a partial fix for the vampire on the Chaos_lair4 map in Lake
Country. I've not yet applied the patch to the CVS tree because there
is still a problem with the vampire: Its speed is reset to the
archetype's speed. I can't think of a simple way to solve this
problem. Maybe the patch can't be improved and the vampire needs a
"randomitems none" or "can_use_* 0".
--
Jan
diff -ru orig/crossfire-0.95.5-cvs3-patch25/common/living.c crossfire-0.95.5-cvs3/common/living.c
--- orig/crossfire-0.95.5-cvs3-patch25/common/living.c Thu Jun 8 17:23:54 2000
+++ crossfire-0.95.5-cvs3/common/living.c Tue Jun 13 16:10:12 2000
@@ -887,18 +887,22 @@
op->slaying=NULL;
}
if(!QUERY_FLAG(op,FLAG_WIZ)) {
- CLEAR_FLAG(op, FLAG_FLYING);
+ if ( ! QUERY_FLAG (&op->arch->clone, FLAG_FLYING))
+ CLEAR_FLAG(op, FLAG_FLYING);
CLEAR_FLAG(op, FLAG_XRAYS);
CLEAR_FLAG(op, FLAG_MAKE_INVIS);
}
CLEAR_FLAG(op,FLAG_LIFESAVE);
- CLEAR_FLAG(op,FLAG_REFL_SPELL);
- CLEAR_FLAG(op,FLAG_REFL_MISSILE);
CLEAR_FLAG(op,FLAG_STEALTH);
+ CLEAR_FLAG(op,FLAG_BLIND);
+ if ( ! QUERY_FLAG (&op->arch->clone, FLAG_REFL_SPELL))
+ CLEAR_FLAG(op,FLAG_REFL_SPELL);
+ if ( ! QUERY_FLAG (&op->arch->clone, FLAG_REFL_MISSILE))
+ CLEAR_FLAG(op,FLAG_REFL_MISSILE);
if(!QUERY_FLAG(&op->arch->clone,FLAG_UNDEAD))
CLEAR_FLAG(op,FLAG_UNDEAD);
- CLEAR_FLAG(op,FLAG_BLIND);
- CLEAR_FLAG(op,FLAG_SEE_IN_DARK);
+ if ( ! QUERY_FLAG (&op->arch->clone, FLAG_SEE_IN_DARK))
+ CLEAR_FLAG(op,FLAG_SEE_IN_DARK);
op->path_attuned=op->arch->clone.path_attuned;
op->path_repelled=op->arch->clone.path_repelled;