summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-01-22 15:36:39 +0100
committerRobert Vollmert <rvollmert@gmx.net>2010-01-22 16:16:39 +0100
commitfb00b043519515f219d0020afe67daaee5bd41ce (patch)
tree357298a4e45ad62a97cc7c1291756853323f8b9a /crawl-ref/source/fight.h
parentff178309a78377fdd4cc18654781d841dbefa319 (diff)
downloadcrawl-ref-fb00b043519515f219d0020afe67daaee5bd41ce.tar.gz
crawl-ref-fb00b043519515f219d0020afe67daaee5bd41ce.zip
Move monster casts from melee_attack to actor.
They might be useful elsewhere, and this means fight.h doesn't need to know "class monster". The new methods monsters* actor::as_monster(); player* actor::as_player(); return NULL if the class doesn't match.
Diffstat (limited to 'crawl-ref/source/fight.h')
-rw-r--r--crawl-ref/source/fight.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h
index 2e40295527..a60a0ffe76 100644
--- a/crawl-ref/source/fight.h
+++ b/crawl-ref/source/fight.h
@@ -74,16 +74,6 @@ class melee_attack
public:
actor *attacker, *defender;
- monsters* attacker_as_monster()
- {
- return dynamic_cast<monsters*>(attacker);
- }
-
- monsters* defender_as_monster()
- {
- return dynamic_cast<monsters*>(defender);
- }
-
bool cancel_attack;
bool did_hit, perceived_attack, obvious_effect;