diff options
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r-- | src/resources/map/map.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 84f1d1049..18e3dc7f5 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1487,3 +1487,14 @@ void Map::setMusicFile(const std::string &file) { setProperty("music", file); } + +void Map::addAnimation(const int gid, TileAnimation *const animation) +{ + std::map<int, TileAnimation*>::iterator it = mTileAnimations.find(gid); + if (it != mTileAnimations.end()) + { + logger->log("duplicate map animation with gid = %d", gid); + delete (*it).second; + } + mTileAnimations[gid] = animation; +} |