summaryrefslogtreecommitdiff
path: root/src/being/castingeffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/castingeffect.cpp')
-rw-r--r--src/being/castingeffect.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/being/castingeffect.cpp b/src/being/castingeffect.cpp
index 0d80f7ce2..cd7bec82a 100644
--- a/src/being/castingeffect.cpp
+++ b/src/being/castingeffect.cpp
@@ -46,15 +46,15 @@ CastingEffect::CastingEffect(const int skillId,
mRectX((x - range) * mapTileSize),
mRectY((y - range) * mapTileSize),
mRectSize(range * mapTileSize * 2 + mapTileSize),
- mAnimationX(mRectX + (mRectSize - (mSprite ?
+ mAnimationX(mRectX + (mRectSize - (mSprite != nullptr ?
mSprite->getWidth() : 0)) / 2),
- mAnimationY(mRectY + (mRectSize - (mSprite ?
+ mAnimationY(mRectY + (mRectSize - (mSprite != nullptr ?
mSprite->getHeight() : 0)) / 2)
{
mPixelX = x * mapTileSize;
mPixelY = y * mapTileSize;
mYDiff = range * mapTileSize + 31;
- if (!mSprite)
+ if (mSprite == nullptr)
{
reportAlways("Skill %d/%d casting animation '%s' load failed",
skillId,
@@ -79,7 +79,7 @@ void CastingEffect::draw(Graphics *const graphics,
mRectY + offsetY,
mRectSize,
mRectSize));
- if (mSprite)
+ if (mSprite != nullptr)
{
mSprite->draw(graphics,
mAnimationX + offsetX,
@@ -89,13 +89,13 @@ void CastingEffect::draw(Graphics *const graphics,
void CastingEffect::update(const int time)
{
- if (mSprite)
+ if (mSprite != nullptr)
mSprite->update(time);
}
bool CastingEffect::isTerminated() const
{
- if (mSprite)
+ if (mSprite != nullptr)
return mSprite->isTerminated();
return false;
}