Skip to content

Commit

Permalink
Fixed bad assertion in animations
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidityC committed Nov 1, 2016
1 parent c64bc70 commit 257c675
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ namespace flat2d

void Entity::addAnimation(std::string id, Animation *animation)
{
assert (animations.find(id) != animations.end());
assert (animations.find(id) == animations.end());

animations[id] = animation;
}

void Entity::startAnimation(std::string id)
{
assert(animations.find(id) != animations.end());

if (!currentAnimation.empty()) {
animations[currentAnimation]->stop();
}
Expand Down

0 comments on commit 257c675

Please sign in to comment.