forked from teamnwah/openmw-tes3coop
Change some printf to LOG_MESSAGE_SIMPLE
printf is not streamed to files
This commit is contained in:
parent
2eda48acca
commit
804259b2c9
7 changed files with 19 additions and 14 deletions
|
@ -50,7 +50,7 @@ void LangNative::LoadProgram(const char *filename)
|
|||
|
||||
for (const auto &function : ScriptFunctions::functions)
|
||||
if (!SetScript(lib, string(pf + function.name).c_str(), function.func.addr))
|
||||
printf("Script function pointer not found: %s\n", function.name);
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Script function pointer not found: %s", function.name);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <MyGUI_ScrollView.h>
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
|
@ -83,7 +84,7 @@ namespace MWGui
|
|||
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_PLACE)->Send(event);
|
||||
|
||||
printf("Sending ID_OBJECT_PLACE\n- cellRef: %s, %i\n- count: %i\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_OBJECT_PLACE\n- cellRef: %s, %i\n- count: %i",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->count);
|
||||
|
|
|
@ -156,7 +156,7 @@ void mwmp::GUIController::showInputBox(const BasePlayer::GUIMessageBox &guiMessa
|
|||
void mwmp::GUIController::onInputBoxDone(MWGui::WindowBase *parWindow)
|
||||
{
|
||||
//MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||
printf("GUIController::OnInputBoxDone: %s.\n",mInputBox->getTextInput().c_str());
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "GUIController::OnInputBoxDone: %s.",mInputBox->getTextInput().c_str());
|
||||
|
||||
Main::get().getLocalPlayer()->guiMessageBox.data = mInputBox->getTextInput();
|
||||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->Send(Main::get().getLocalPlayer());
|
||||
|
@ -198,7 +198,7 @@ void mwmp::GUIController::update(float dt)
|
|||
int pressedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
||||
if (pressedButton != -1 && calledMessageBox)
|
||||
{
|
||||
printf("Pressed: %d\n", pressedButton);
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Pressed: %d", pressedButton);
|
||||
calledMessageBox = false;
|
||||
Main::get().getLocalPlayer()->guiMessageBox.data = MyGUI::utility::toString(pressedButton);
|
||||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->Send(Main::get().getLocalPlayer());
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <components/esm/cellid.hpp>
|
||||
|
||||
#include <components/openmw-mp/Base/WorldEvent.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
|
||||
|
@ -193,7 +194,7 @@ namespace MWScript
|
|||
event->shortVal = value;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_LOCAL_SHORT)->Send(event);
|
||||
|
||||
printf("Sending ID_SCRIPT_LOCAL_SHORT\n- cellRef: %s, %i\n- cell: %s\n- index: %i\n- shortVal: %i\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_LOCAL_SHORT\n- cellRef: %s, %i\n- cell: %s\n- index: %i\n- shortVal: %i",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.getDescription().c_str(),
|
||||
|
@ -230,7 +231,7 @@ namespace MWScript
|
|||
event->floatVal = value;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_LOCAL_FLOAT)->Send(event);
|
||||
|
||||
printf("Sending ID_SCRIPT_LOCAL_FLOAT\n- cellRef: %s, %i\n- cell: %s\n- index: %i\n- floatVal: %f\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_LOCAL_FLOAT\n- cellRef: %s, %i\n- cell: %s\n- index: %i\n- floatVal: %f",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.getDescription().c_str(),
|
||||
|
@ -288,7 +289,7 @@ namespace MWScript
|
|||
event->shortVal = value;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_GLOBAL_SHORT)->Send(event);
|
||||
|
||||
printf("Sending ID_SCRIPT_GLOBAL_SHORT\n- varName: %s\n- shortVal: %i\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_GLOBAL_SHORT\n- varName: %s\n- shortVal: %i",
|
||||
event->varName.c_str(),
|
||||
event->shortVal);
|
||||
}
|
||||
|
@ -618,7 +619,7 @@ namespace MWScript
|
|||
event->shortVal = value;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_MEMBER_SHORT)->Send(event);
|
||||
|
||||
printf("Sending ID_SCRIPT_MEMBER_SHORT\n- cellRef: %s\n- index: %i\n- shortVal: %i\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_MEMBER_SHORT\n- cellRef: %s\n- index: %i\n- shortVal: %i",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->index,
|
||||
event->shortVal);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <components/interpreter/interpreter.hpp>
|
||||
#include <components/interpreter/runtime.hpp>
|
||||
#include <components/interpreter/opcodes.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
@ -558,7 +559,7 @@ namespace MWScript
|
|||
event->count = 1;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_PLACE)->Send(event);
|
||||
|
||||
printf("Sending ID_OBJECT_PLACE\n- cellRef: %s, %i\n- count: %i\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_OBJECT_PLACE\n- cellRef: %s, %i\n- count: %i",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->count);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "actiontake.hpp"
|
||||
|
||||
#include <components/openmw-mp/Base/WorldEvent.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
|
@ -31,7 +32,7 @@ namespace MWWorld
|
|||
event->cellRef.mRefNum = getTarget().getCellRef().getRefNum();
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->Send(event);
|
||||
|
||||
printf("Sending ID_OBJECT_DELETE about\n- cellRef: %s, %i\n- cell: %s\n",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_OBJECT_DELETE about\n- cellRef: %s, %i\n- cell: %s.",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.getDescription().c_str());
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <components/resource/resourcesystem.hpp>
|
||||
|
||||
#include <components/sceneutil/positionattitudetransform.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
@ -1158,8 +1159,8 @@ namespace MWWorld
|
|||
|
||||
// tes3mp debug start
|
||||
if (currCell != newCell) {
|
||||
|
||||
printf("Tick: %s was %s move from %s to %s\n",
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Tick: %s was %s move from %s to %s",
|
||||
ptr.getBase()->mRef.getRefId().c_str(),
|
||||
ptr.getBase()->canChangeCell ? "allowed" : "denied",
|
||||
currCell->getCell()->getDescription().c_str(),
|
||||
|
@ -2271,7 +2272,7 @@ namespace MWWorld
|
|||
event->state = state;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_ACTIVATE)->Send(event);
|
||||
|
||||
printf("Door activation 1\n- cellRef: %s, %i\n- cell: %s\n- state: %s",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Door activation 1\n- cellRef: %s, %i\n- cell: %s\n- state: %s",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.getDescription().c_str(),
|
||||
|
@ -2291,7 +2292,7 @@ namespace MWWorld
|
|||
event->state = state;
|
||||
mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_ACTIVATE)->Send(event);
|
||||
|
||||
printf("Door activation 2\n- cellRef: %s, %i\n- cell: %s\n- state: %s",
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Door activation 2\n- cellRef: %s, %i\n- cell: %s\n- state: %s",
|
||||
event->cellRef.mRefID.c_str(),
|
||||
event->cellRef.mRefNum.mIndex,
|
||||
event->cell.getDescription().c_str(),
|
||||
|
|
Loading…
Reference in a new issue