forked from mirror/openmw-tes3mp
Merge pull request #312 from TES3MP/master
Add master commits up to 10 Oct 2017
This commit is contained in:
commit
fe9a3088bd
7 changed files with 28 additions and 12 deletions
|
@ -538,6 +538,7 @@ if(WIN32)
|
||||||
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.openmw.org")
|
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.openmw.org")
|
||||||
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org")
|
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org")
|
||||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "openmw-launcher.exe")
|
SET(CPACK_NSIS_INSTALLED_ICON_NAME "openmw-launcher.exe")
|
||||||
|
SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "openmw-launcher.exe")
|
||||||
SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp.ico")
|
SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp.ico")
|
||||||
SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp.ico")
|
SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp.ico")
|
||||||
SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp")
|
SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp")
|
||||||
|
|
|
@ -30,8 +30,17 @@ Cell::Iterator Cell::end() const
|
||||||
|
|
||||||
void Cell::addPlayer(Player *player)
|
void Cell::addPlayer(Player *player)
|
||||||
{
|
{
|
||||||
auto it = find(player->cells.begin(), player->cells.end(), this);
|
// Ensure the player hasn't already been added
|
||||||
if (it == player->cells.end())
|
auto it = find(begin(), end(), player);
|
||||||
|
|
||||||
|
if (it != end())
|
||||||
|
{
|
||||||
|
LOG_APPEND(Log::LOG_INFO, "- Attempt to add %s to Cell %s again was ignored", player->npc.mName.c_str(), getDescription().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto it2 = find(player->cells.begin(), player->cells.end(), this);
|
||||||
|
if (it2 == player->cells.end())
|
||||||
{
|
{
|
||||||
LOG_APPEND(Log::LOG_INFO, "- Adding %s to Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
LOG_APPEND(Log::LOG_INFO, "- Adding %s to Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,9 @@ void ContainerItemModel::update()
|
||||||
|
|
||||||
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it)
|
||||||
{
|
{
|
||||||
|
if (!(*it).getClass().showsInInventory(*it))
|
||||||
|
continue;
|
||||||
|
|
||||||
std::vector<ItemStack>::iterator itemStack = mItems.begin();
|
std::vector<ItemStack>::iterator itemStack = mItems.begin();
|
||||||
for (; itemStack != mItems.end(); ++itemStack)
|
for (; itemStack != mItems.end(); ++itemStack)
|
||||||
{
|
{
|
||||||
|
|
|
@ -203,4 +203,10 @@ namespace MWGui
|
||||||
checkReferenceAvailable();
|
checkReferenceAvailable();
|
||||||
mTimeAdvancer.onFrame(dt);
|
mTimeAdvancer.onFrame(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TrainingWindow::exit()
|
||||||
|
{
|
||||||
|
return !mTimeAdvancer.isRunning();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace MWGui
|
||||||
|
|
||||||
virtual void onOpen();
|
virtual void onOpen();
|
||||||
|
|
||||||
bool exit() { return false; }
|
bool exit();
|
||||||
|
|
||||||
void setPtr(const MWWorld::Ptr& actor);
|
void setPtr(const MWWorld::Ptr& actor);
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ mwmp::GUIController::GUIController(): mInputBox(0), mListBox(0)
|
||||||
mChat = nullptr;
|
mChat = nullptr;
|
||||||
keySay = SDL_SCANCODE_Y;
|
keySay = SDL_SCANCODE_Y;
|
||||||
keyChatMode = SDL_SCANCODE_F2;
|
keyChatMode = SDL_SCANCODE_F2;
|
||||||
calledMessageBox = false;
|
calledInteractiveMessage = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mwmp::GUIController::~GUIController()
|
mwmp::GUIController::~GUIController()
|
||||||
|
@ -118,10 +118,7 @@ void mwmp::GUIController::showDialogList(const mwmp::BasePlayer::GUIMessageBox &
|
||||||
void mwmp::GUIController::showMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox)
|
void mwmp::GUIController::showMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox)
|
||||||
{
|
{
|
||||||
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||||
std::vector<std::string> buttons;
|
windowManager->messageBox(guiMessageBox.label);
|
||||||
buttons.push_back("Ok");
|
|
||||||
windowManager->interactiveMessageBox(guiMessageBox.label, buttons);
|
|
||||||
calledMessageBox = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> splitString(const std::string &str, char delim = ';')
|
std::vector<std::string> splitString(const std::string &str, char delim = ';')
|
||||||
|
@ -139,7 +136,7 @@ void mwmp::GUIController::showCustomMessageBox(const BasePlayer::GUIMessageBox &
|
||||||
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||||
std::vector<std::string> buttons = splitString(guiMessageBox.buttons);
|
std::vector<std::string> buttons = splitString(guiMessageBox.buttons);
|
||||||
windowManager->interactiveMessageBox(guiMessageBox.label, buttons);
|
windowManager->interactiveMessageBox(guiMessageBox.label, buttons);
|
||||||
calledMessageBox = true;
|
calledInteractiveMessage = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mwmp::GUIController::showInputBox(const BasePlayer::GUIMessageBox &guiMessageBox)
|
void mwmp::GUIController::showInputBox(const BasePlayer::GUIMessageBox &guiMessageBox)
|
||||||
|
@ -207,10 +204,10 @@ void mwmp::GUIController::update(float dt)
|
||||||
// checked somewhere else
|
// checked somewhere else
|
||||||
int pressedButton = MWBase::Environment::get().getWindowManager()->readPressedButton(false);
|
int pressedButton = MWBase::Environment::get().getWindowManager()->readPressedButton(false);
|
||||||
|
|
||||||
if (pressedButton != -1 && calledMessageBox)
|
if (pressedButton != -1 && calledInteractiveMessage)
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Pressed: %d", pressedButton);
|
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Pressed: %d", pressedButton);
|
||||||
calledMessageBox = false;
|
calledInteractiveMessage = false;
|
||||||
Main::get().getLocalPlayer()->guiMessageBox.data = MyGUI::utility::toString(pressedButton);
|
Main::get().getLocalPlayer()->guiMessageBox.data = MyGUI::utility::toString(pressedButton);
|
||||||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->setPlayer(Main::get().getLocalPlayer());
|
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->setPlayer(Main::get().getLocalPlayer());
|
||||||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->Send();
|
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->Send();
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace mwmp
|
||||||
int keyChatMode;
|
int keyChatMode;
|
||||||
|
|
||||||
long id;
|
long id;
|
||||||
bool calledMessageBox;
|
bool calledInteractiveMessage;
|
||||||
TextInputDialog *mInputBox;
|
TextInputDialog *mInputBox;
|
||||||
GUIDialogList *mListBox;
|
GUIDialogList *mListBox;
|
||||||
void onInputBoxDone(MWGui::WindowBase* parWindow);
|
void onInputBoxDone(MWGui::WindowBase* parWindow);
|
||||||
|
|
Loading…
Reference in a new issue