summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-11 17:02:16 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-02-11 17:02:16 +0100
commitf262dbd28f08001d70416e3cc4e62273d3fee2cd (patch)
tree539cbc8b27edf696120df0ac26531640c323692f /src/being.cpp
parentd68f3fa13297cf4c8d29753e48c684496852ceba (diff)
parent63ac001daa7dfc0735dfefd9c2829c8786b4edaf (diff)
downloadmana-client-f262dbd28f08001d70416e3cc4e62273d3fee2cd.tar.gz
mana-client-f262dbd28f08001d70416e3cc4e62273d3fee2cd.tar.bz2
mana-client-f262dbd28f08001d70416e3cc4e62273d3fee2cd.tar.xz
mana-client-f262dbd28f08001d70416e3cc4e62273d3fee2cd.zip
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 521947e3..0ccf675c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -221,7 +221,7 @@ void Being::setSpeech(const std::string &text, Uint32 time)
end = mSpeech.find(']', start);
}
- if (mSpeech != "")
+ if (!mSpeech.empty())
mSpeechTime = time <= SPEECH_MAX_TIME ? time : SPEECH_MAX_TIME;
}
@@ -370,8 +370,8 @@ void Being::setDirection(Uint8 direction)
for (int i = 0; i < VECTOREND_SPRITE; i++)
{
- if (mSprites[i] != NULL)
- mSprites[i]->setDirection(dir);
+ if (mSprites[i])
+ mSprites[i]->setDirection(dir);
}
}
@@ -470,7 +470,7 @@ void Being::logic()
// Update sprite animations
for (int i = 0; i < VECTOREND_SPRITE; i++)
{
- if (mSprites[i] != NULL)
+ if (mSprites[i])
{
mSprites[i]->update(tick_time * 10);
}
@@ -500,7 +500,7 @@ void Being::draw(Graphics *graphics, int offsetX, int offsetY) const
for (int i = 0; i < VECTOREND_SPRITE; i++)
{
- if (mSprites[i] != NULL)
+ if (mSprites[i])
{
mSprites[i]->draw(graphics, px, py);
}
@@ -756,14 +756,14 @@ void Being::internalTriggerEffect(int effectId, bool sfx, bool gfx)
return;
}
- if (gfx && ed->mGFXEffect != "") {
+ if (gfx && !ed->mGFXEffect.empty()) {
Particle *selfFX;
selfFX = particleEngine->addEffect(ed->mGFXEffect, 0, 0);
controlParticle(selfFX);
}
- if (sfx && ed->mSFXEffect != "") {
+ if (sfx && !ed->mSFXEffect.empty()) {
sound.playSfx(ed->mSFXEffect);
}
}
@@ -831,7 +831,7 @@ static void initializeHair()
int index = atoi(XML::getProperty(node, "id", "-1").c_str());
std::string value = XML::getProperty(node, "value", "");
- if (index >= 0 && value != "") {
+ if (index >= 0 && !value.empty()) {
if (index >= hairColorsNr) {
hairColorsNr = index + 1;
hairColors.resize(hairColorsNr, "#000000");