aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/hero.cpp4
-rw-r--r--engines/cge2/hero.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp
index cebfe73295..c9b8dc5a13 100644
--- a/engines/cge2/hero.cpp
+++ b/engines/cge2/hero.cpp
@@ -40,6 +40,10 @@ Hero::Hero(CGE2Engine *vm)
}
}
+Hero::~Hero() {
+ contract();
+}
+
Sprite *Hero::expand() { // It's very similar to Sprite's expand, but doesn't bother with "labels" for example. TODO: Try to unify the two later!
if (_ext)
return this;
diff --git a/engines/cge2/hero.h b/engines/cge2/hero.h
index c277b4a780..3b5329e12c 100644
--- a/engines/cge2/hero.h
+++ b/engines/cge2/hero.h
@@ -75,6 +75,7 @@ public:
int _maxDist;
bool _ignoreMap;
Hero(CGE2Engine *vm);
+ ~Hero();
void tick();
Sprite *expand();
Sprite *contract();