diff options
Diffstat (limited to 'src/resources/map')
-rw-r--r-- | src/resources/map/map.cpp | 7 | ||||
-rw-r--r-- | src/resources/map/map.h | 15 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 073adb2ed..f8780fbf6 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -592,6 +592,7 @@ void Map::drawCollision(Graphics *restrict const graphics, fillCollision(BlockMask::WATER, WATER_COLLISION_HIGHLIGHT); fillCollision(BlockMask::GROUNDTOP, GROUNDTOP_COLLISION_HIGHLIGHT); fillCollision(BlockMask::PLAYERWALL, COLLISION_HIGHLIGHT); + fillCollision(BlockMask::MONSTERWALL, MONSTER_COLLISION_HIGHLIGHT); } } } @@ -713,6 +714,9 @@ void Map::addBlockMask(const int x, const int y, case BlockType::PLAYERWALL: mMetaTiles[tileNum].blockmask |= BlockMask::PLAYERWALL; break; + case BlockType::MONSTERWALL: + mMetaTiles[tileNum].blockmask |= BlockMask::MONSTERWALL; + break; default: case BlockType::NONE: case BlockType::NB_BLOCKTYPES: @@ -749,6 +753,9 @@ void Map::setBlockMask(const int x, const int y, case BlockType::PLAYERWALL: mMetaTiles[tileNum].blockmask = BlockMask::PLAYERWALL; break; + case BlockType::MONSTERWALL: + mMetaTiles[tileNum].blockmask = BlockMask::MONSTERWALL; + break; default: case BlockType::NONE: case BlockType::NB_BLOCKTYPES: diff --git a/src/resources/map/map.h b/src/resources/map/map.h index 5abc9c964..8f7b6dbab 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -72,13 +72,14 @@ class Map final : public Properties, public: enum CollisionTypes { - COLLISION_EMPTY = 0, // no collision - COLLISION_WALL = 1, // full collison - COLLISION_AIR = 2, // air units can walk - COLLISION_WATER = 3, // water units can walk - COLLISION_GROUNDTOP = 4, // no collision (chair, bed, etc) - COLLISION_PLAYER_WALL = 5, // full collision for player - COLLISION_MAX = 6 // count index + COLLISION_EMPTY = 0, // no collision + COLLISION_WALL = 1, // full collison + COLLISION_AIR = 2, // air units can walk + COLLISION_WATER = 3, // water units can walk + COLLISION_GROUNDTOP = 4, // no collision (chair, bed, etc) + COLLISION_PLAYER_WALL = 5, // full collision for player + COLLISION_MONSTER_WALL = 6, // full collision for monster + COLLISION_MAX = 7 // count index }; /** |