diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-30 12:25:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-30 12:25:16 +0300 |
commit | 1680d159ecbf75591d2dab1416ff8144c27d4de5 (patch) | |
tree | cd34ad27487036265f08d7aa63476c160280d899 /src/resources/map | |
parent | 9913b4b481ddcaf0fa8499f3554c85bb588be7f0 (diff) | |
download | plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.gz plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.bz2 plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.xz plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.zip |
Rename player_node variable into localPlayer.
Diffstat (limited to 'src/resources/map')
-rw-r--r-- | src/resources/map/map.cpp | 4 | ||||
-rw-r--r-- | src/resources/map/maplayer.cpp | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index e588d12bc..ba469c394 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -314,7 +314,7 @@ void Map::update(const int ticks) void Map::draw(Graphics *const graphics, int scrollX, int scrollY) { - if (!player_node) + if (!localPlayer) return; BLOCK_START("Map::draw") @@ -1218,7 +1218,7 @@ void Map::setPvpMode(const int mode) else mPvp |= mode; - if (mPvp != oldMode && player_node) + if (mPvp != oldMode && localPlayer) { switch (mPvp) { diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 308e27c86..63d6a97c6 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -94,7 +94,7 @@ void MapLayer::draw(Graphics *const graphics, const int scrollX, const int scrollY, const int layerDrawFlags) const { - if (!player_node) + if (!localPlayer) return; BLOCK_START("MapLayer::draw") @@ -371,7 +371,7 @@ void MapLayer::drawFringe(Graphics *const graphics, int startX, int startY, const int layerDrawFlags, const int yFix) const { BLOCK_START("MapLayer::drawFringe") - if (!player_node || !mSpecialLayer || !mTempLayer) + if (!localPlayer || !mSpecialLayer || !mTempLayer) { BLOCK_END("MapLayer::drawFringe") return; @@ -537,12 +537,12 @@ void MapLayer::drawFringe(Graphics *const graphics, int startX, int startY, ++ai; } BLOCK_END("MapLayer::drawFringe drawmobs") - if (mHighlightAttackRange && player_node) + if (mHighlightAttackRange && localPlayer) { - const int px = player_node->getPixelX() + const int px = localPlayer->getPixelX() - scrollX - mapTileSize / 2; - const int py = player_node->getPixelY() - scrollY - mapTileSize; - const int attackRange = player_node->getAttackRange() + const int py = localPlayer->getPixelY() - scrollY - mapTileSize; + const int attackRange = localPlayer->getAttackRange() * mapTileSize; int x = px - attackRange; |