diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/chat.cpp | 6 | ||||
-rw-r--r-- | src/gui/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/minimap.cpp | 4 | ||||
-rw-r--r-- | src/gui/ministatus.cpp | 2 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 14 | ||||
-rw-r--r-- | src/gui/setup_interface.cpp | 8 | ||||
-rw-r--r-- | src/gui/socialwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/specialswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/statuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 40 | ||||
-rw-r--r-- | src/gui/widgets/chattab.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 2 |
12 files changed, 45 insertions, 45 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 0e75bda3..92386e76 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -472,7 +472,7 @@ void ChatWindow::whisper(const std::string &nick, if (mes.empty()) return; - std::string playerName = player_node->getName(); + std::string playerName = local_player->getName(); std::string tempNick = nick; toLower(playerName); @@ -502,7 +502,7 @@ void ChatWindow::whisper(const std::string &nick, else { tab->chatLog(nick, mes); - player_node->afkRespond(tab, nick); + local_player->afkRespond(tab, nick); } } else @@ -523,7 +523,7 @@ void ChatWindow::whisper(const std::string &nick, ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo) { - std::string playerName = player_node->getName(); + std::string playerName = local_player->getName(); std::string tempNick = nick; toLower(playerName); diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 4e8eae4d..df723fd4 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -63,7 +63,7 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment): // Control that shows the Player PlayerBox *playerBox = new PlayerBox; playerBox->setDimension(gcn::Rectangle(50, 80, 74, 123)); - playerBox->setPlayer(player_node); + playerBox->setPlayer(local_player); setWindowName("Equipment"); setCloseButton(true); diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 6ee416f5..ff282164 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -166,7 +166,7 @@ void Minimap::draw(gcn::Graphics *graphics) if (mMapImage->getWidth() > a.width || mMapImage->getHeight() > a.height) { - const Vector &p = player_node->getPosition(); + const Vector &p = local_player->getPosition(); mapOriginX = (int) (((a.width) / 2) - (int) (p.x * mWidthProportion) / mMap->getTileWidth()); mapOriginY = (int) (((a.height) / 2) @@ -203,7 +203,7 @@ void Minimap::draw(gcn::Graphics *graphics) int type = UserPalette::PC; - if (being == player_node) + if (being == local_player) { type = UserPalette::SELF; dotSize = 3; diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index f3a8b807..2bdf79b4 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -207,7 +207,7 @@ void MiniStatusWindow::logic() if (config.getValue("xpBarMonsterCounterExp", 0)!=0) { updatedText << " | " - << (int)(((float)player_node->mXpForNextLevel - (float)player_node->mXp) + << (int)(((float)local_player->mXpForNextLevel - (float)local_player->mXp) / (float)config.getValue("xpBarMonsterCounterExp", 0)) << " " << config.getValue("xpBarMonsterCounterName", "Monsters") <<" left..."; diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index fbe3c739..742d480d 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -126,11 +126,11 @@ void PopupMenu::showPopup(int x, int y, Being *being) break; } - if (player_node->getNumberOfGuilds()) + if (local_player->getNumberOfGuilds()) mBrowserBox->addRow(strprintf("@@guild|%s@@", strprintf(_("Invite %s to join your guild"), name.c_str()).c_str())); - if (player_node->isInParty() || + if (local_player->isInParty() || Net::getNetworkType() == ServerInfo::MANASERV) { mBrowserBox->addRow(strprintf("@@party|%s@@", @@ -138,7 +138,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) name.c_str()).c_str())); } - if (player_node->isGM()) + if (local_player->isGM()) { mBrowserBox->addRow("##3---"); mBrowserBox->addRow(strprintf("@@admin-kick|%s@@", @@ -162,7 +162,7 @@ void PopupMenu::showPopup(int x, int y, Being *being) strprintf(_("Attack %s"), name.c_str()).c_str())); - if (player_node->isGM()) + if (local_player->isGM()) mBrowserBox->addRow(strprintf("@@admin-kick|%s@@", _("Kick monster"))); } @@ -220,7 +220,7 @@ void PopupMenu::handleLink(const std::string &link) // Attack action else if (link == "attack" && being) { - player_node->attack(being, true); + local_player->attack(being, true); } else if (link == "whisper" && being) { @@ -253,13 +253,13 @@ void PopupMenu::handleLink(const std::string &link) else if (link == "guild" && being && being->getType() == ActorSprite::PLAYER) { - player_node->inviteToGuild(being); + local_player->inviteToGuild(being); } // Pick Up Floor Item action else if ((link == "pickup") && mFloorItem) { - player_node->pickUp(mFloorItem); + local_player->pickUp(mFloorItem); } // Look To action diff --git a/src/gui/setup_interface.cpp b/src/gui/setup_interface.cpp index 5eefe6d5..be69048d 100644 --- a/src/gui/setup_interface.cpp +++ b/src/gui/setup_interface.cpp @@ -230,8 +230,8 @@ void Setup_Interface::cancel() config.setValue("visiblenames", mVisibleNamesEnabled); config.setValue("speech", mSpeechMode); config.setValue("showownname", mNameEnabled); - if (player_node) - player_node->setCheckNameSetting(true); + if (local_player) + local_player->setCheckNameSetting(true); config.setValue("logNpcInGui", mNPCLogEnabled); config.setValue("guialpha", mOpacity); config.setValue("showpickupchat", mPickupChatEnabled); @@ -274,8 +274,8 @@ void Setup_Interface::action(const gcn::ActionEvent &event) { // Notify the local player that settings have changed for the name // and requires an update - if (player_node) - player_node->setCheckNameSetting(true); + if (local_player) + local_player->setCheckNameSetting(true); config.setValue("showownname", mNameCheckBox->isSelected()); } else if (id == "lognpc") diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 1aa57f2f..2ed7c14c 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -341,9 +341,9 @@ SocialWindow::SocialWindow() : mCreatePopup = new CreatePopup(); - if (player_node->getParty()) + if (local_player->getParty()) { - addTab(player_node->getParty()); + addTab(local_player->getParty()); } else updateButtons(); @@ -614,7 +614,7 @@ void SocialWindow::showPartyInvite(const std::string &inviter, void SocialWindow::showPartyCreate() { - if (player_node->getParty()) + if (local_player->getParty()) { new OkDialog(_("Create Party"), _("Cannot create party. You are already in a party"), diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp index b511e4a3..0f146fa2 100644 --- a/src/gui/specialswindow.cpp +++ b/src/gui/specialswindow.cpp @@ -106,7 +106,7 @@ void SpecialsWindow::action(const gcn::ActionEvent &event) if (disp) { - /*Being *target = player_node->getTarget(); + /*Being *target = local_player->getTarget(); if (target) Net::getSpecialHandler()->use(disp->mInfo->id, 1, target->getId()); diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 822dec3e..dbad01a7 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -94,7 +94,7 @@ class ChangeDisplay : public AttrDisplay, gcn::ActionListener }; StatusWindow::StatusWindow(): - Window(player_node->getName()) + Window(local_player->getName()) { listen(Event::AttributesChannel); diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 1fa60808..453f615e 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -97,7 +97,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) { static int lastTick = tick_time; - if (!mMap || !player_node) + if (!mMap || !local_player) { gcnGraphics->setColor(gcn::Color(64, 64, 64)); gcnGraphics->fillRectangle( @@ -117,7 +117,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) int midTileX = (graphics->getWidth() + mScrollCenterOffsetX) / 2; int midTileY = (graphics->getHeight() + mScrollCenterOffsetX) / 2; - const Vector &playerPos = player_node->getPosition(); + const Vector &playerPos = local_player->getPosition(); const int player_x = (int) playerPos.x - midTileX; const int player_y = (int) playerPos.y - midTileY; @@ -211,10 +211,10 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) } } - if (player_node->getCheckNameSetting()) + if (local_player->getCheckNameSetting()) { - player_node->setCheckNameSetting(false); - player_node->setName(player_node->getName()); + local_player->setCheckNameSetting(false); + local_player->setName(local_player->getName()); } // Draw text @@ -320,7 +320,7 @@ void Viewport::_drawDebugPath(Graphics *graphics) if (mouseDestination.x != lastMouseDestination.x || mouseDestination.y != lastMouseDestination.y) { - const Vector &playerPos = player_node->getPosition(); + const Vector &playerPos = local_player->getPosition(); // Adapt the path finding to the precision requested if (Net::getPlayerHandler()->usePixelPrecision()) @@ -329,7 +329,7 @@ void Viewport::_drawDebugPath(Graphics *graphics) (int) playerPos.y, mouseDestination.x, mouseDestination.y, - player_node->getCollisionRadius(), + local_player->getCollisionRadius(), walkMask); } else @@ -414,7 +414,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event) return; // Check if we are alive and kickin' - if (!mMap || !player_node || !player_node->isAlive()) + if (!mMap || !local_player || !local_player->isAlive()) return; // Check if we are busy @@ -436,7 +436,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event) // Right click might open a popup if (event.getButton() == gcn::MouseEvent::RIGHT) { - if (mHoverBeing && mHoverBeing != player_node) + if (mHoverBeing && mHoverBeing != local_player) { mPopupMenu->showPopup(event.getX(), event.getY(), mHoverBeing); return; @@ -468,28 +468,28 @@ void Viewport::mousePressed(gcn::MouseEvent &event) // Ignore it if its dead if (mHoverBeing->isAlive()) { - if (player_node->withinAttackRange(mHoverBeing) || + if (local_player->withinAttackRange(mHoverBeing) || keyboard.isKeyActive(keyboard.KEY_ATTACK)) - player_node->attack(mHoverBeing, + local_player->attack(mHoverBeing, !keyboard.isKeyActive(keyboard.KEY_TARGET)); else - player_node->setGotoTarget(mHoverBeing); + local_player->setGotoTarget(mHoverBeing); } } // Picks up a item if we clicked on one } else if (mHoverItem) { - player_node->pickUp(mHoverItem); + local_player->pickUp(mHoverItem); } - else if (player_node->getCurrentAction() == Being::SIT) + else if (local_player->getCurrentAction() == Being::SIT) { return; } // Just walk around else { - player_node->stopAttack(); + local_player->stopAttack(); mPlayerFollowMouse = true; // Make the player go to the mouse position @@ -503,13 +503,13 @@ void Viewport::mousePressed(gcn::MouseEvent &event) pixelX, pixelY, 20, ActorSprite::MONSTER); if (target) - player_node->setTarget(target); + local_player->setTarget(target); } } void Viewport::mouseDragged(gcn::MouseEvent &event) { - if (!mMap || !player_node) + if (!mMap || !local_player) return; if (mPlayerFollowMouse && !event.isShiftPressed()) @@ -517,9 +517,9 @@ void Viewport::mouseDragged(gcn::MouseEvent &event) if (get_elapsed_time(mLocalWalkTime) >= walkingMouseDelay) { mLocalWalkTime = tick_time; - player_node->setDestination(event.getX() + (int) mPixelViewX, + local_player->setDestination(event.getX() + (int) mPixelViewX, event.getY() + (int) mPixelViewY); - player_node->pathSetByMouse(); + local_player->pathSetByMouse(); } } } @@ -543,7 +543,7 @@ void Viewport::closePopupMenu() void Viewport::mouseMoved(gcn::MouseEvent &event) { // Check if we are on the map - if (!mMap || !player_node) + if (!mMap || !local_player) return; const int x = (event.getX() + (int) mPixelViewX); diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index bd4c5910..20aadfb7 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -246,7 +246,7 @@ void ChatTab::chatLog(std::string line, Own own, bool ignoreRecord) void ChatTab::chatLog(const std::string &nick, const std::string &msg) { chatLog(nick + " : " + msg, - nick == player_node->getName() ? BY_PLAYER : BY_OTHER, + nick == local_player->getName() ? BY_PLAYER : BY_OTHER, false); } diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 864f1f51..c3674c54 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -56,7 +56,7 @@ void WhisperTab::handleInput(const std::string &msg) Net::getChatHandler()->privateMessage(mNick, msg); - chatLog(player_node->getName(), msg); + chatLog(local_player->getName(), msg); } void WhisperTab::handleCommand(const std::string &msg) |