diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-05 20:45:39 +0300 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-05 18:50:57 +0100 |
commit | 08a20c3dc9e4789ebf538ec09963a02a28ae2532 (patch) | |
tree | d148339a05bd545491d4fe2255070be805db1aeb /crawl-ref/source/player.cc | |
parent | de162132f702a4723cc9390d8c83baa012844161 (diff) | |
download | crawl-ref-08a20c3dc9e4789ebf538ec09963a02a28ae2532.tar.gz crawl-ref-08a20c3dc9e4789ebf538ec09963a02a28ae2532.zip |
Replace uses of player_in_water with you.in_water.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e0a768146c..40c39454aa 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -418,11 +418,6 @@ bool player_in_hell(void) && you.where_are_you != BRANCH_VESTIBULE_OF_HELL); } -bool player_in_water(void) -{ - return (you.in_water()); -} - bool player_likes_water(bool permanently) { return (player_can_swim() || (!permanently && beogh_water_walk())); @@ -1893,7 +1888,7 @@ int player_movement_speed(void) // Swiftness is an Air spell, it doesn't work in water, but // flying players will move faster. - if (you.duration[DUR_SWIFTNESS] > 0 && !player_in_water()) + if (you.duration[DUR_SWIFTNESS] > 0 && !you.in_water()) mv -= (you.flight_mode() == FL_FLY ? 4 : 2); // Mutations: -2, -3, -4, unless innate and shapechanged. @@ -3528,7 +3523,7 @@ int check_stealth(void) if (you.airborne()) stealth += 10; - else if (player_in_water()) + else if (you.in_water()) { // Merfolk can sneak up on monsters underwater -- bwr if (you.species == SP_MERFOLK) @@ -4045,7 +4040,7 @@ void display_char_status() const int move_cost = (player_speed() * player_movement_speed()) / 10; - const bool water = player_in_water(); + const bool water = you.in_water(); const bool swim = you.swimming(); const bool lev = you.airborne(); @@ -6168,7 +6163,7 @@ std::string player::foot_name(bool plural, bool *can_plural) const str = "underbelly"; *can_plural = false; } - else if (this->species == SP_MERFOLK && you.swimming()) + else if (this->species == SP_MERFOLK && this->swimming()) { str = "tail"; *can_plural = false; @@ -7001,7 +6996,7 @@ bool player::visible_to(const actor *looker) const return (can_see_invisible() || !invisible()); const monsters* mon = dynamic_cast<const monsters*>(looker); - return (!this->invisible() || player_in_water() || + return (!this->invisible() || this->in_water() || mon->can_see_invisible() || mons_sense_invis(mon)); } |