#U986: <email deleted> wrote
on Sunday, April 4, 2004 at 20:27:06: > On occassion when restoring a game where the > character is wielding Sting, floor glyphs > will show up before the --more-- prompt. > These floor glyphs usually correspond to the > location of monsters (sometimes they are just > cavern features such as walls). Some of these > floor glyphs are not in the character's line > of sight upon restoring. Also in this patch is a restore of Sting's ability to glow blue.
This commit is contained in:
@@ -70,6 +70,8 @@ a slow-moving monster hidden under a rotting corpse was not immediately
|
||||
mimic that ends up on the rogue level should not mimic a closed door
|
||||
polymorphed or shapechanged monster sometimes got erroneous hit points
|
||||
mimic should not mimic a boulder while on a pit or hole location
|
||||
Sting could trigger premature display of orcs during savegame restore
|
||||
Sting now glows light blue again
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -36,6 +36,7 @@ E NEARDATA int occtime;
|
||||
|
||||
#define WARNCOUNT 6 /* number of different warning levels */
|
||||
E uchar warnsyms[WARNCOUNT];
|
||||
E NEARDATA int warn_obj_cnt; /* count of monsters meeting criteria */
|
||||
|
||||
E int x_maze_max, y_maze_max;
|
||||
E int otg_temp;
|
||||
@@ -214,6 +215,7 @@ E NEARDATA boolean stoned;
|
||||
E NEARDATA boolean unweapon;
|
||||
E NEARDATA boolean mrg_to_wielded;
|
||||
E NEARDATA struct obj *current_wand;
|
||||
E NEARDATA boolean defer_see_monsters;
|
||||
|
||||
E NEARDATA boolean in_steed_dismounting;
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ E long FDECL(spec_m2, (struct obj *));
|
||||
E boolean FDECL(artifact_has_invprop, (struct obj *,UCHAR_P));
|
||||
E long FDECL(arti_cost, (struct obj *));
|
||||
E struct obj *FDECL(what_gives, (long *));
|
||||
E void FDECL(Sting_effects, (int));
|
||||
|
||||
/* ### attrib.c ### */
|
||||
|
||||
|
||||
@@ -53,6 +53,10 @@ moveloop()
|
||||
#endif
|
||||
|
||||
(void) encumber_msg(); /* in case they auto-picked up something */
|
||||
if (defer_see_monsters) {
|
||||
defer_see_monsters = FALSE;
|
||||
see_monsters();
|
||||
}
|
||||
|
||||
u.uz0.dlevel = u.uz.dlevel;
|
||||
youmonst.movement = NORMAL_SPEED; /* give the hero some movement points */
|
||||
|
||||
@@ -1540,5 +1540,18 @@ long *abil;
|
||||
}
|
||||
return (struct obj *)0;
|
||||
}
|
||||
|
||||
void
|
||||
Sting_effects(orc_count)
|
||||
int orc_count;
|
||||
{
|
||||
if (uwep && uwep->oartifact == ART_STING) {
|
||||
if (orc_count > 0 && warn_obj_cnt == 0)
|
||||
pline("%s %s %s!", bare_artifactname(uwep),
|
||||
otense(uwep,"glow"), hcolor(NH_LIGHT_BLUE));
|
||||
else if (orc_count == 0 && warn_obj_cnt > 0)
|
||||
pline("%s stops glowing.", bare_artifactname(uwep));
|
||||
}
|
||||
}
|
||||
/*artifact.c*/
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ struct dgn_topology dungeon_topology = {DUMMY};
|
||||
#include "quest.h"
|
||||
struct q_score quest_status = DUMMY;
|
||||
|
||||
NEARDATA int warn_obj_cnt = 0;
|
||||
NEARDATA int smeq[MAXNROFROOMS+1] = DUMMY;
|
||||
NEARDATA int doorindex = 0;
|
||||
NEARDATA char *save_cm = 0;
|
||||
@@ -116,6 +117,7 @@ NEARDATA dest_area updest = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
NEARDATA dest_area dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
NEARDATA coord inv_pos = { 0, 0 };
|
||||
|
||||
NEARDATA boolean defer_see_monsters = FALSE;
|
||||
NEARDATA boolean in_mklev = FALSE;
|
||||
NEARDATA boolean stoned = FALSE; /* done to monsters hit by 'c' */
|
||||
NEARDATA boolean unweapon = FALSE;
|
||||
|
||||
@@ -1067,12 +1067,28 @@ void
|
||||
see_monsters()
|
||||
{
|
||||
register struct monst *mon;
|
||||
int new_warn_obj_cnt = 0;
|
||||
|
||||
if (defer_see_monsters) return;
|
||||
|
||||
for (mon = fmon; mon; mon = mon->nmon) {
|
||||
if (DEADMONSTER(mon)) continue;
|
||||
newsym(mon->mx,mon->my);
|
||||
if (mon->wormno) see_wsegs(mon);
|
||||
if (MATCH_WARN_OF_MON(mon)) {
|
||||
if (context.warntype.obj &&
|
||||
(context.warntype.obj & mon->data->mflags2)) new_warn_obj_cnt++;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Make Sting glow blue or stop glowing if required.
|
||||
*/
|
||||
if (new_warn_obj_cnt != warn_obj_cnt &&
|
||||
uwep && uwep->oartifact == ART_STING) {
|
||||
Sting_effects(new_warn_obj_cnt);
|
||||
warn_obj_cnt = new_warn_obj_cnt;
|
||||
}
|
||||
|
||||
#ifdef STEED
|
||||
/* when mounted, hero's location gets caught by monster loop */
|
||||
if (!u.usteed)
|
||||
|
||||
@@ -423,6 +423,13 @@ unsigned int *stuckid, *steedid; /* STEED */
|
||||
migrating_mons = restmonchn(fd, FALSE);
|
||||
mread(fd, (genericptr_t) mvitals, sizeof(mvitals));
|
||||
|
||||
/*
|
||||
* There are some things after this that can have unintended display
|
||||
* side-effects too early in the game.
|
||||
* Disable see_monsters() here, re-enable it at the top of moveloop()
|
||||
*/
|
||||
defer_see_monsters = TRUE;
|
||||
|
||||
/* this comes after inventory has been loaded */
|
||||
for(otmp = invent; otmp; otmp = otmp->nobj)
|
||||
if(otmp->owornmask)
|
||||
|
||||
Reference in New Issue
Block a user