Show stinking cloud valid positions
This commit is contained in:
@@ -829,8 +829,10 @@ shieldeff(x,y)
|
||||
* DISP_ALWAYS- Like DISP_FLASH, but vision is not taken into account.
|
||||
*/
|
||||
|
||||
#define TMP_AT_MAX_GLYPHS (COLNO*2)
|
||||
|
||||
static struct tmp_glyph {
|
||||
coord saved[COLNO]; /* previously updated positions */
|
||||
coord saved[TMP_AT_MAX_GLYPHS]; /* previously updated positions */
|
||||
int sidx; /* index of next unused slot in saved[] */
|
||||
int style; /* either DISP_BEAM or DISP_FLASH or DISP_ALWAYS */
|
||||
int glyph; /* glyph to use when printing */
|
||||
@@ -900,7 +902,7 @@ tmp_at(x, y)
|
||||
default: /* do it */
|
||||
if (tglyph->style == DISP_BEAM || tglyph->style == DISP_ALL) {
|
||||
if (tglyph->style != DISP_ALL && !cansee(x,y)) break;
|
||||
if (tglyph->sidx >= COLNO) break; /* too many locations */
|
||||
if (tglyph->sidx >= TMP_AT_MAX_GLYPHS) break; /* too many locations */
|
||||
/* save pos for later erasing */
|
||||
tglyph->saved[tglyph->sidx].x = x;
|
||||
tglyph->saved[tglyph->sidx].y = y;
|
||||
|
||||
Reference in New Issue
Block a user