diff --git a/Aquaria/Entity.cpp b/Aquaria/Entity.cpp index b7f9597..957266c 100644 --- a/Aquaria/Entity.cpp +++ b/Aquaria/Entity.cpp @@ -812,7 +812,7 @@ void Entity::heal(float a, int type) } } -void Entity::revive(int a) +void Entity::revive(float a) { entityDead = false; health = 0; diff --git a/Aquaria/Entity.h b/Aquaria/Entity.h index 11b3e1c..4bb1306 100644 --- a/Aquaria/Entity.h +++ b/Aquaria/Entity.h @@ -351,7 +351,7 @@ public: bool isHit(); bool pathBurst(bool wallJump = false); Timer burstTimer; - void revive(int a); + void revive(float a); void setName(const std::string &name); void doFriction(float dt); void doFriction(float dt, int len); diff --git a/BBGE/SkeletalSprite.cpp b/BBGE/SkeletalSprite.cpp index 63a0976..9ff1b90 100644 --- a/BBGE/SkeletalSprite.cpp +++ b/BBGE/SkeletalSprite.cpp @@ -461,7 +461,7 @@ void AnimationLayer::playAnimation(int idx, int loop) //doNextKeyframe(); } -void AnimationLayer::enqueueAnimation(std::string anim, int loop) +void AnimationLayer::enqueueAnimation(const std::string& anim, int loop) { enqueuedAnimation = anim; enqueuedAnimationLoop = loop; @@ -514,7 +514,7 @@ Animation* AnimationLayer::getCurrentAnimation() return &s->animations[currentAnimation]; } -bool AnimationLayer::createTransitionAnimation(std::string anim, float time) +bool AnimationLayer::createTransitionAnimation(const std::string& anim, float time) { //Animation *a = getCurrentAnimation(); Animation *to = s->getAnimation(anim); @@ -555,6 +555,7 @@ void AnimationLayer::stopAnimation() { animate(enqueuedAnimation, enqueuedAnimationLoop); enqueuedAnimation = ""; + enqueuedAnimationLoop = 0; } } @@ -1145,7 +1146,7 @@ void SkeletalSprite::deleteBones() bones.clear(); } -Animation *SkeletalSprite::getAnimation(std::string anim) +Animation *SkeletalSprite::getAnimation(const std::string& anim) { for (int i = 0; i < animations.size(); i++) { diff --git a/BBGE/SkeletalSprite.h b/BBGE/SkeletalSprite.h index 518f687..b170765 100644 --- a/BBGE/SkeletalSprite.h +++ b/BBGE/SkeletalSprite.h @@ -163,10 +163,10 @@ public: void updateBones(); void stopAnimation(); float getAnimationLength(); - bool createTransitionAnimation(std::string anim, float time); + bool createTransitionAnimation(const std::string& anim, float time); void playAnimation(int idx, int loop); void playCurrentAnimation(int loop); - void enqueueAnimation(std::string anim, int loop); + void enqueueAnimation(const std::string& anim, int loop); float transitionAnimate(std::string anim, float time, int loop); void setTimeMultiplier(float t); bool isAnimating(); @@ -240,7 +240,7 @@ public: - Animation *getAnimation(std::string anim); + Animation *getAnimation(const std::string& anim); std::vector animations; std::vector bones;