diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-05 19:17:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-05 19:17:59 +0300 |
commit | 1a9f3cc7de6e7e304290d2979eefbf9b0239a968 (patch) | |
tree | a583bdcac59f4dcf882d435c58928344c0b9c352 /src/being/being.cpp | |
parent | b19a1c6d50c2c0f4233972f20c9354efca5ccb66 (diff) | |
download | plus-1a9f3cc7de6e7e304290d2979eefbf9b0239a968.tar.gz plus-1a9f3cc7de6e7e304290d2979eefbf9b0239a968.tar.bz2 plus-1a9f3cc7de6e7e304290d2979eefbf9b0239a968.tar.xz plus-1a9f3cc7de6e7e304290d2979eefbf9b0239a968.zip |
Replace most getters callc getTileX/getTileY to direct variables usage.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 2e1302fb7..127c38232 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -942,8 +942,8 @@ void Being::handleAttack(Being *restrict const victim, if (this != localPlayer) setAction(BeingAction::ATTACK, attackId); - mLastAttackX = victim->getTileX(); - mLastAttackY = victim->getTileY(); + mLastAttackX = victim->mX; + mLastAttackY = victim->mY; if (mType == ActorType::Player && mEquippedWeapon) fireMissile(victim, mEquippedWeapon->getMissileParticleFile()); @@ -957,8 +957,8 @@ void Being::handleAttack(Being *restrict const victim, !serverFeatures->haveAttackDirections() && this != localPlayer) { - const uint8_t dir = calcDirection(victim->getTileX(), - victim->getTileY()); + const uint8_t dir = calcDirection(victim->mX, + victim->mY); if (dir) setDirection(dir); } @@ -1021,8 +1021,8 @@ void Being::handleSkill(Being *restrict const victim, if (!serverFeatures->haveAttackDirections() && this != localPlayer) { - const uint8_t dir = calcDirection(victim->getTileX(), - victim->getTileY()); + const uint8_t dir = calcDirection(victim->mX, + victim->mY); if (dir) setDirection(dir); } @@ -1896,8 +1896,8 @@ void Being::petLogic() restrict2 mMoveTime = time; - const int dstX0 = mOwner->getTileX(); - const int dstY0 = mOwner->getTileY(); + const int dstX0 = mOwner->mX; + const int dstY0 = mOwner->mY; int dstX = dstX0; int dstY = dstY0; const int followDist = mInfo->getStartFollowDist(); @@ -3900,8 +3900,8 @@ void Being::fixPetSpawnPos(int &restrict dstX, { if (!mMap->getWalk(dstX, dstY, getBlockWalkMask())) { - dstX = mOwner->getTileX(); - dstY = mOwner->getTileY(); + dstX = mOwner->mX; + dstY = mOwner->mY; } } } |