From 7dfe062b9e33d863d23455453aae12ba592aac8b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 6 Oct 2013 16:37:19 +0300 Subject: remove unused includes and remove default parameter in being. --- src/being/being.cpp | 18 +++++++++--------- src/being/being.h | 2 +- src/being/playerinfo.cpp | 1 - src/being/playerinfo.h | 2 -- 4 files changed, 10 insertions(+), 13 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index 3bf1c4453..94e94161e 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -742,7 +742,7 @@ void Being::handleAttack(Being *const victim, const int damage, setDirection(dir); } if (damage && victim->mType == PLAYER && victim->mAction == SIT) - victim->setAction(STAND); + victim->setAction(STAND, 0); if (mType == PLAYER) { @@ -795,7 +795,7 @@ void Being::handleSkill(Being *const victim, const int damage, setDirection(dir); } if (damage && victim->mType == PLAYER && victim->mAction == SIT) - victim->setAction(STAND); + victim->setAction(STAND, 0); if (data) { if (damage > 0) @@ -1337,7 +1337,7 @@ void Being::nextTile() { if (mPath.empty()) { - setAction(STAND); + setAction(STAND, 0); return; } @@ -1350,7 +1350,7 @@ void Being::nextTile() if (!mMap || !mMap->getWalk(pos.x, pos.y, getWalkMask())) { - setAction(STAND); + setAction(STAND, 0); return; } @@ -1366,7 +1366,7 @@ void Being::nextTile() mY = pos.y; const uint8_t height = mMap->getHeightOffset(mX, mY); mOffsetY = height - mOldHeight; - setAction(MOVE); + setAction(MOVE, 0); } void Being::logic() @@ -1446,7 +1446,7 @@ void Being::logic() } if (mAction != MOVE) - setAction(MOVE); + setAction(MOVE, 0); // Update the player sprite direction. // N.B.: We only change this if the distance is more than one pixel. @@ -1480,7 +1480,7 @@ void Being::logic() } else if (mAction == MOVE) { - setAction(STAND); + setAction(STAND, 0); } } else @@ -1962,7 +1962,7 @@ void Being::setSprite(const unsigned int slot, const int id, if (isWeapon) mEquippedWeapon = &ItemDB::get(id); - setAction(mAction); + setAction(mAction, 0); } if (!isTempSprite) @@ -2899,7 +2899,7 @@ void Being::updatePercentHP() { mNumber = num; if (updateNumber(mNumber)) - setAction(mAction); + setAction(mAction, 0); } } } diff --git a/src/being/being.h b/src/being/being.h index 314787a56..dff4afbda 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -495,7 +495,7 @@ class Being : public ActorSprite, public ConfigListener /** * Sets the current action. */ - virtual void setAction(const Action &action, const int attackType = 0); + virtual void setAction(const Action &action, const int attackType); /** * Get the being's action currently performed. diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index bc7a6776b..a59acce38 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -24,7 +24,6 @@ #include "client.h" #include "configuration.h" #include "depricatedevent.h" -#include "flooritem.h" #include "inventory.h" #include "itemsoundmanager.h" diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index 5311a24f4..bd4bff1b1 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -24,8 +24,6 @@ #include "equipment.h" -#include "resources/soundinfo.h" - #include #include -- cgit v1.2.3-70-g09d2