From: Martin Read Date: Wed, 26 Feb 2014 03:42:44 +0000 (+0000) Subject: Food meter now gets updated in a timely manner. X-Git-Url: http://git.blackswordsonics.com/?a=commitdiff_plain;h=4b9e39a4e7b1023b02f18f2d5d6d830790ef14e7;p=victrix-abyssi Food meter now gets updated in a timely manner. notify-local-tty.cc, notify.hh: Rejigged hunger notifications u.cc: Use new approach to hunger notification --- diff --git a/notify-local-tty.cc b/notify-local-tty.cc index c6d8408..70e881b 100644 --- a/notify-local-tty.cc +++ b/notify-local-tty.cc @@ -181,9 +181,14 @@ void notify_player_regen(void) print_msg("Your ring pulses soothingly.\n"); } -void notify_hunger_level(int severity) +void notify_food_use(int amount, int hunger_severity) { - switch (severity) + if (amount != 0) + { + status_updated = true; + display_update(); + } + switch (hunger_severity) { case 0: default: diff --git a/notify.hh b/notify.hh index 419114e..d8b0abc 100644 --- a/notify.hh +++ b/notify.hh @@ -44,13 +44,13 @@ void notify_hp_gain(int amount); void notify_player_teleport(void); void notify_player_telefail(void); void notify_player_regen(void); -void notify_hunger_level(int severity); void notify_leadfoot_recovered(void); void notify_armourmelt_recovered(void); void notify_wither_recovered(void); void notify_protection_lost(void); void notify_wasted_gain(void); void notify_defence_recalc(void); +void notify_food_use(int food_use, int hunger_severity); // Resistance notifications diff --git a/u.cc b/u.cc index 42436c3..e847902 100644 --- a/u.cc +++ b/u.cc @@ -476,7 +476,7 @@ void update_player(void) squeal = 2; } u.food -= food_use; - notify_hunger_level(squeal); + notify_food_use(food_use, squeal); } if (u.leadfoot > 0) {