From fa923f929b3f52a18273b5831425b2e3db08e583 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 20 Feb 2015 17:18:48 +0300 Subject: Fix cart enable/disable status effect. --- src/being/actorsprite.cpp | 2 +- src/statuseffect.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index a2e7524cc..343018204 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -220,7 +220,7 @@ void ActorSprite::updateStatusEffect(const int index, const bool newStatus) return; if (effect->isPoison() && getType() == ActorType::Player) setPoison(newStatus); - if (localPlayer == this) + if (effect->isCart() && localPlayer == this) setHaveCart(newStatus); handleStatusEffect(effect, index); } diff --git a/src/statuseffect.h b/src/statuseffect.h index 143124948..4cba35432 100644 --- a/src/statuseffect.h +++ b/src/statuseffect.h @@ -77,6 +77,9 @@ class StatusEffect final bool isPoison() const A_WARN_UNUSED { return mIsPoison; } + bool isCart() const A_WARN_UNUSED + { return mIsCart; } + /** * Retrieves a status effect. * -- cgit v1.2.3-70-g09d2