From f2013e1e567d2a91be8b696cdd1db3edd5906f99 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 4 Aug 2016 01:58:51 +0300 Subject: Add some missing tmwa defines. Fix compilation error without tmwa support. --- src/gui/viewport.cpp | 5 +++++ src/gui/widgets/avatarlistbox.cpp | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src/gui') diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 3a61e0f65..e476e4b38 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -440,8 +440,11 @@ bool Viewport::leftMouseAction() validateSpeed(); if (actorManager) { +#ifdef TMWA_SUPPORT if (localPlayer != mHoverBeing || mSelfMouseHeal) actorManager->heal(mHoverBeing); +#endif // TMWA_SUPPORT + if (localPlayer == mHoverBeing && mHoverItem) localPlayer->pickUp(mHoverItem); return true; @@ -484,7 +487,9 @@ bool Viewport::leftMouseAction() case ActorType::Elemental: break; case ActorType::Unknown: +#ifdef TMWA_SUPPORT case ActorType::LocalPet: +#endif case ActorType::Avatar: default: reportAlways("Left click on unknown actor type: %d", diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index 9919a10d3..e4c5d3e93 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -613,6 +613,7 @@ void AvatarListBox::mousePressed(MouseEvent &event) const MouseButtonT eventButton = event.getButton(); if (eventButton == MouseButton::LEFT) { +#ifdef TMWA_SUPPORT if (type == MapItemType::EMPTY) { const Being *const being = actorManager->findBeingByName( @@ -621,6 +622,7 @@ void AvatarListBox::mousePressed(MouseEvent &event) actorManager->heal(being); } else +#endif // TMWA_SUPPORT { localPlayer->navigateTo(ava->getX(), ava->getY()); } -- cgit v1.2.3-70-g09d2