summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/travel.h')
-rw-r--r--crawl-ref/source/travel.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.h b/crawl-ref/source/travel.h
index c5a12529dc..65e2bcd08a 100644
--- a/crawl-ref/source/travel.h
+++ b/crawl-ref/source/travel.h
@@ -179,7 +179,9 @@ enum explore_stop_type
////////////////////////////////////////////////////////////////////////////
// Structs for interlevel travel.
-// Identifies a level.
+// Identifies a level. Should never include virtual methods or
+// dynamically allocated memory (see code to push level_id onto Lua
+// stack in luadgn.cc)
class level_id
{
public:
@@ -233,6 +235,14 @@ public:
|| level_type != LEVEL_DUNGEON;
}
+ const level_id &operator = (const level_id &id)
+ {
+ branch = id.branch;
+ depth = id.depth;
+ level_type = id.level_type;
+ return (*this);
+ }
+
bool operator == ( const level_id &id ) const
{
return (level_type == id.level_type