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 | |
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>
-rw-r--r-- | crawl-ref/source/itemprop.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 15 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/spells1.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/tilepick.cc | 2 |
5 files changed, 8 insertions, 15 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 90dade7d51..0fb2848b76 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1227,7 +1227,7 @@ bool check_armour_shape( const item_def &item, bool quiet ) break; case SP_MERFOLK: - if (player_in_water() && item.sub_type == ARM_BOOTS) + if (you.in_water() && item.sub_type == ARM_BOOTS) { if (!quiet) mpr("You don't currently have feet!"); 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)); } diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index d62a4affdc..c2abc6d700 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -537,8 +537,6 @@ bool is_light_armour( const item_def &item ); bool player_light_armour(bool with_skill = false); -bool player_in_water(void); - bool player_under_penance(void); int player_wielded_item(); diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index df0bcebb33..0267230e41 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -1459,7 +1459,7 @@ void cast_berserk(void) void cast_swiftness(int power) { - if (player_in_water()) + if (you.in_water()) { mpr("The water foams!"); return; diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index e119ae6b78..579d704cf1 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -3242,7 +3242,7 @@ void tilep_race_default(int sp, int gender, int level, int *parts) hair = 0; break; case SP_MERFOLK: - result = player_in_water() ? TILEP_BASE_MERFOLK_WATER + result = you.in_water() ? TILEP_BASE_MERFOLK_WATER : TILEP_BASE_MERFOLK; break; case SP_VAMPIRE: |