Skip to content

Instantly share code, notes, and snippets.

@takkaria
Created June 11, 2016 23:24
Show Gist options
  • Save takkaria/6e6beaa08fbd950718914f2b66acfe75 to your computer and use it in GitHub Desktop.
Save takkaria/6e6beaa08fbd950718914f2b66acfe75 to your computer and use it in GitHub Desktop.
Potential fix for gold detection redraw issues
diff --git a/src/effects.c b/src/effects.c
index 9c09734..58e64df 100644
--- a/src/effects.c
+++ b/src/effects.c
@@ -1228,6 +1228,7 @@ bool effect_handler_DETECT_GOLD(effect_handler_context_t *context)
if (square_hasgoldvein(cave, y, x)) {
/* Memorize */
square_memorize(cave, y, x);
+ square_light_spot(cave, y, x);
/* Detect */
gold_buried = true;
@@ -1243,11 +1244,8 @@ bool effect_handler_DETECT_GOLD(effect_handler_context_t *context)
msg("You sense no buried treasure.");
}
- /* Fully update the visuals */
- player->upkeep->update |= (PU_FORGET_VIEW | PU_UPDATE_VIEW | PU_MONSTERS);
-
/* Redraw whole map, monster list */
- player->upkeep->redraw |= (PR_MAP | PR_MONLIST | PR_ITEMLIST);
+ player->upkeep->redraw |= (PR_MONLIST | PR_ITEMLIST);
context->ident = true;
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment