summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapmark.h
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2010-12-25 18:49:30 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2010-12-25 18:56:28 +1000
commit65265646d4a0aaf96896d210a10994fe4b036b78 (patch)
treefa9d506c5ad5f4cf58b3fca2e2204de1944b1337 /crawl-ref/source/mapmark.h
parent51c31aabb8d36db0f3ad69a4b982aeed88806e87 (diff)
downloadcrawl-ref-65265646d4a0aaf96896d210a10994fe4b036b78.tar.gz
crawl-ref-65265646d4a0aaf96896d210a10994fe4b036b78.zip
Fix #2975: crash on loading save after monster cast Malign Gateway.
This dumps the storage of the caster as part of the map marker, and instead uses, temporarily and for monster-cast MG, the monster's full name as a non-actor summoner. Cons: the blame prefix won't work fully for monsters that are summoned themselves casting Malign Gateway. Future fix: replace passing of actor into mgen_data with a new struct, ie "summon_chain", that contains relevant information (caster's name, serial number, behaviour and own blame vector, for instance). Increments minor version to 21. Finally, should fix loading of games currently broken due to this bug.
Diffstat (limited to 'crawl-ref/source/mapmark.h')
-rw-r--r--crawl-ref/source/mapmark.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/mapmark.h b/crawl-ref/source/mapmark.h
index cde61aa3d7..45490607c3 100644
--- a/crawl-ref/source/mapmark.h
+++ b/crawl-ref/source/mapmark.h
@@ -125,8 +125,9 @@ class map_malign_gateway_marker : public map_marker
{
public:
map_malign_gateway_marker (const coord_def& pos = coord_def(0, 0),
- int dur = 0, bool ip = false, monster* mon = NULL,
- god_type gd = GOD_NO_GOD, int pow = 0);
+ int dur = 0, bool ip = false, std::string caster = "",
+ beh_type bh = BEH_HOSTILE, god_type gd = GOD_NO_GOD,
+ int pow = 0);
void write (writer &) const;
void read (reader &);
@@ -139,7 +140,8 @@ public:
int duration;
bool is_player;
bool monster_summoned;
- monster* caster;
+ std::string summoner_string;
+ beh_type behaviour;
god_type god;
int power;
};