summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-02 15:34:37 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-02 15:34:37 +1000
commitc30b21d1404d7b78978af36466e21db785753188 (patch)
treeed173e95db72d2e59b91077b5a6fa3a0b9f5e8f0 /crawl-ref/source/spells3.cc
parentcb8c1f9af8848ba60ed8ee2adca222c909ba52db (diff)
downloadcrawl-ref-c30b21d1404d7b78978af36466e21db785753188.tar.gz
crawl-ref-c30b21d1404d7b78978af36466e21db785753188.zip
Rename "wizard" to "wizard_tele" so it doesn't shadow player::wizard.
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index f612a1708b..75f12203a8 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1410,17 +1410,17 @@ void you_teleport(void)
}
}
-static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizard)
+static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizard_tele)
{
bool is_controlled = (allow_control && !you.confused()
&& player_control_teleport()
&& allow_control_teleport());
// All wizard teleports are automatically controlled.
- if (wizard)
+ if (wizard_tele)
is_controlled = true;
- if (scan_artefacts(ARTP_PREVENT_TELEPORTATION) && !wizard)
+ if (scan_artefacts(ARTP_PREVENT_TELEPORTATION) && !wizard_tele)
{
mpr("You feel a strange sense of stasis.");
return (false);
@@ -1462,7 +1462,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
check_ring_TC = true;
// Only have the more prompt for non-wizard.
- if (!wizard)
+ if (!wizard_tele)
more();
while (true)
@@ -1511,7 +1511,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
}
// Don't randomly walk wizard teleports.
- if (!wizard)
+ if (!wizard_tele)
{
pos.x += random2(3) - 1;
pos.y += random2(3) - 1;
@@ -1553,7 +1553,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
is_controlled = false;
large_change = false;
}
- else if (testbits(env.pgrid(pos), FPROP_NO_CTELE_INTO) && !wizard)
+ else if (testbits(env.pgrid(pos), FPROP_NO_CTELE_INTO) && !wizard_tele)
{
is_controlled = false;
large_change = false;
@@ -1566,7 +1566,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
// Controlling teleport contaminates the player. - bwr
move_player_to_grid(pos, false, true, true);
- if (!wizard)
+ if (!wizard_tele)
contaminate_player(1, true);
}
}
@@ -1668,9 +1668,10 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, bool wizar
return (!is_controlled);
}
-void you_teleport_now(bool allow_control, bool new_abyss_area, bool wizard)
+void you_teleport_now(bool allow_control, bool new_abyss_area, bool wizard_tele)
{
- const bool randtele = _teleport_player(allow_control, new_abyss_area, wizard);
+ const bool randtele = _teleport_player(allow_control, new_abyss_area,
+ wizard_tele);
// Xom is amused by uncontrolled teleports that land you in a
// dangerous place, unless the player is in the Abyss and