mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-01 01:09:39 +00:00
[General] Rename Log class into TimedLog
This commit is contained in:
parent
ab93b5ddc5
commit
0339958e21
146 changed files with 658 additions and 658 deletions
|
@ -34,19 +34,19 @@ void Cell::addPlayer(Player *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());
|
||||
LOG_APPEND(TimedLog::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(TimedLog::LOG_INFO, "- Adding %s to Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
||||
|
||||
player->cells.push_back(this);
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Adding %s to Cell %s", player->npc.mName.c_str(), getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Adding %s to Cell %s", player->npc.mName.c_str(), getDescription().c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnCellLoad")>(player->getId(), getDescription().c_str());
|
||||
|
||||
|
@ -64,13 +64,13 @@ void Cell::removePlayer(Player *player, bool cleanPlayer)
|
|||
auto it2 = find(player->cells.begin(), player->cells.end(), this);
|
||||
if (it2 != player->cells.end())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Removing %s from Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Removing %s from Player %s", getDescription().c_str(), player->npc.mName.c_str());
|
||||
|
||||
player->cells.erase(it2);
|
||||
}
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Removing %s from Cell %s", player->npc.mName.c_str(), getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Removing %s from Cell %s", player->npc.mName.c_str(), getDescription().c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnCellUnload")>(player->getId(), getDescription().c_str());
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ Cell *CellController::getCellByXY(int x, int y)
|
|||
|
||||
if (it == cells.end())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Attempt to get Cell at %i, %i failed!", x, y);
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Attempt to get Cell at %i, %i failed!", x, y);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ Cell *CellController::getCellByName(std::string cellName)
|
|||
|
||||
if (it == cells.end())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Attempt to get Cell at %s failed!", cellName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Attempt to get Cell at %s failed!", cellName.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ Cell *CellController::getCellByName(std::string cellName)
|
|||
|
||||
Cell *CellController::addCell(ESM::Cell cellData)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Loaded cells: %d", cells.size());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Loaded cells: %d", cells.size());
|
||||
auto it = find_if(cells.begin(), cells.end(), [cellData](const Cell *c) {
|
||||
// Currently we cannot compare because plugin lists can be loaded in different order
|
||||
//return c->cell.sRecordId == cellData.sRecordId;
|
||||
|
@ -100,14 +100,14 @@ Cell *CellController::addCell(ESM::Cell cellData)
|
|||
Cell *cell;
|
||||
if (it == cells.end())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Adding %s to CellController", cellData.getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Adding %s to CellController", cellData.getDescription().c_str());
|
||||
|
||||
cell = new Cell(cellData);
|
||||
cells.push_back(cell);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Found %s in CellController", cellData.getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Found %s in CellController", cellData.getDescription().c_str());
|
||||
cell = *it;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ void CellController::removeCell(Cell *cell)
|
|||
if (*it != nullptr && *it == cell)
|
||||
{
|
||||
Script::Call<Script::CallbackIdentity("OnCellDeletion")>(cell->getDescription().c_str());
|
||||
LOG_APPEND(Log::LOG_INFO, "- Removing %s from CellController", cell->getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Removing %s from CellController", cell->getDescription().c_str());
|
||||
|
||||
delete *it;
|
||||
it = cells.erase(it);
|
||||
|
@ -136,7 +136,7 @@ void CellController::removeCell(Cell *cell)
|
|||
|
||||
void CellController::deletePlayer(Player *player)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Iterating through Cells from Player %s", player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Iterating through Cells from Player %s", player->npc.mName.c_str());
|
||||
|
||||
std::vector<Cell*> toDelete;
|
||||
|
||||
|
@ -153,7 +153,7 @@ void CellController::deletePlayer(Player *player)
|
|||
|
||||
for (auto &&cell : toDelete)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Cell %s has no players left", cell->getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Cell %s has no players left", cell->getDescription().c_str());
|
||||
removeCell(cell);
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ void CellController::update(Player *player)
|
|||
}
|
||||
for (auto &&cell : toDelete)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Cell %s has no players left", cell->getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Cell %s has no players left", cell->getDescription().c_str());
|
||||
removeCell(cell);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <thread>
|
||||
#include <RakPeerInterface.h>
|
||||
#include "MasterClient.hpp"
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
#include <components/openmw-mp/Master/PacketMasterAnnounce.hpp>
|
||||
#include "Networking.hpp"
|
||||
|
@ -134,12 +134,12 @@ bool MasterClient::Process(RakNet::Packet *packet)
|
|||
pma.SetReadStream(&rs);
|
||||
pma.Read();
|
||||
if (pma.GetFunc() == PacketMasterAnnounce::FUNCTION_KEEP)
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Server data successfully updated on master server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Server data successfully updated on master server");
|
||||
else if (pma.GetFunc() == PacketMasterAnnounce::FUNCTION_DELETE)
|
||||
{
|
||||
if (timeout != 0)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Update rate is too low,"
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Update rate is too low,"
|
||||
" and the master server has deleted information about the server. Trying low rate...");
|
||||
if ((timeout - step_rate) >= step_rate)
|
||||
SetUpdateRate(timeout - step_rate);
|
||||
|
@ -148,7 +148,7 @@ bool MasterClient::Process(RakNet::Packet *packet)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received wrong packet from master server with id: %d", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received wrong packet from master server with id: %d", packet->data[0]);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -172,7 +172,7 @@ void MasterClient::Send(mwmp::PacketMasterAnnounce::Func func)
|
|||
case IS_SILENTLY_DISCONNECTING:
|
||||
case IS_DISCONNECTING:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Cannot connect to master server: %s", masterServer.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Cannot connect to master server: %s", masterServer.ToString());
|
||||
return;
|
||||
}
|
||||
case IS_PENDING:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <components/misc/stringops.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
#include <components/openmw-mp/Packets/PacketPreInit.hpp>
|
||||
|
||||
|
@ -98,14 +98,14 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
|
||||
if (!myPacket->isPacketValid())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Invalid handshake packet from client at %s", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Invalid handshake packet from client at %s", packet->systemAddress.ToString());
|
||||
kickPlayer(player->guid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->isHandshaked())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Wrong handshake with client at %s", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Wrong handshake with client at %s", packet->systemAddress.ToString());
|
||||
kickPlayer(player->guid);
|
||||
return;
|
||||
}
|
||||
|
@ -114,14 +114,14 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
{
|
||||
if (isPassworded())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Wrong server password %s used by client at %s",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Wrong server password %s used by client at %s",
|
||||
player->serverPassword.c_str(), packet->systemAddress.ToString());
|
||||
kickPlayer(player->guid);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Client at %s tried to join using password, despite the server not being passworded",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Client at %s tried to join using password, despite the server not being passworded",
|
||||
packet->systemAddress.ToString());
|
||||
}
|
||||
}
|
||||
|
@ -132,8 +132,8 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
if (!player->isHandshaked())
|
||||
{
|
||||
player->incrementHandshakeAttempts();
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Have not completed handshake with client at %s", packet->systemAddress.ToString());
|
||||
LOG_APPEND(Log::LOG_WARN, "- Attempts so far: %i", player->getHandshakeAttempts());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Have not completed handshake with client at %s", packet->systemAddress.ToString());
|
||||
LOG_APPEND(TimedLog::LOG_WARN, "- Attempts so far: %i", player->getHandshakeAttempts());
|
||||
|
||||
if (player->getHandshakeAttempts() > 20)
|
||||
kickPlayer(player->guid, false);
|
||||
|
@ -160,7 +160,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
}
|
||||
else if (packet->data[0] == ID_PLAYER_BASEINFO)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_BASEINFO about %s", player->npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_BASEINFO about %s", player->npc.mName.c_str());
|
||||
|
||||
myPacket->setPlayer(player);
|
||||
myPacket->Read();
|
||||
|
@ -178,7 +178,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
|
||||
|
||||
if (!PlayerProcessor::Process(*packet))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ void Networking::processActorPacket(RakNet::Packet *packet)
|
|||
return;
|
||||
|
||||
if (!ActorProcessor::Process(*packet, baseActorList))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", packet->data[0]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ void Networking::processObjectPacket(RakNet::Packet *packet)
|
|||
return;
|
||||
|
||||
if (!ObjectProcessor::Process(*packet, baseObjectList))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ObjectPacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled ObjectPacket with identifier %i has arrived", packet->data[0]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ void Networking::processWorldstatePacket(RakNet::Packet *packet)
|
|||
return;
|
||||
|
||||
if (!WorldstateProcessor::Process(*packet, baseWorldstate))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldstatePacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled WorldstatePacket with identifier %i has arrived", packet->data[0]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ bool Networking::preInit(RakNet::Packet *packet, RakNet::BitStream &bsIn)
|
|||
{
|
||||
if (packet->data[0] != ID_GAME_PREINIT)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "%s sent wrong first packet (ID_GAME_PREINIT was expected)",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "%s sent wrong first packet (ID_GAME_PREINIT was expected)",
|
||||
packet->systemAddress.ToString());
|
||||
peer->CloseConnection(packet->systemAddress, true);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ bool Networking::preInit(RakNet::Packet *packet, RakNet::BitStream &bsIn)
|
|||
|
||||
if (!packetPreInit.isPacketValid() || dataFiles.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_ERROR, "Invalid packetPreInit");
|
||||
LOG_APPEND(TimedLog::LOG_ERROR, "Invalid packetPreInit");
|
||||
peer->CloseConnection(packet->systemAddress, false); // close connection without notification
|
||||
return false;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ bool Networking::preInit(RakNet::Packet *packet, RakNet::BitStream &bsIn)
|
|||
{
|
||||
for (int i = 0; dataFile != dataFiles.end(); dataFile++, i++)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- %X\t%s", dataFile->second[0], dataFile->first.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- %X\t%s", dataFile->second[0], dataFile->first.c_str());
|
||||
// Check if the filenames match, ignoring case
|
||||
if (Misc::StringUtils::ciEqual(samples[i].first, dataFile->first))
|
||||
{
|
||||
|
@ -271,14 +271,14 @@ bool Networking::preInit(RakNet::Packet *packet, RakNet::BitStream &bsIn)
|
|||
// If the loop above was broken, then the client's data files do not match the server's
|
||||
if (dataFileEnforcementState && dataFile != dataFiles.end())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s was not allowed to connect due to incompatible data files", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "%s was not allowed to connect due to incompatible data files", packet->systemAddress.ToString());
|
||||
packetPreInit.setChecksums(&samples);
|
||||
packetPreInit.Send(packet->systemAddress);
|
||||
peer->CloseConnection(packet->systemAddress, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s was allowed to connect", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "%s was allowed to connect", packet->systemAddress.ToString());
|
||||
PacketPreInit::PluginContainer tmp;
|
||||
packetPreInit.setChecksums(&tmp);
|
||||
packetPreInit.Send(packet->systemAddress);
|
||||
|
@ -314,7 +314,7 @@ void Networking::update(RakNet::Packet *packet, RakNet::BitStream &bsIn)
|
|||
processWorldstatePacket(packet);
|
||||
}
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled RakNet packet with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled RakNet packet with identifier %i has arrived", packet->data[0]);
|
||||
}
|
||||
|
||||
void Networking::newPlayer(RakNet::RakNetGUID guid)
|
||||
|
@ -325,7 +325,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
|
|||
playerPacketController->GetPacket(ID_PLAYER_CELL_CHANGE)->RequestData(guid);
|
||||
playerPacketController->GetPacket(ID_PLAYER_EQUIPMENT)->RequestData(guid);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Sending info about other players to %lu", guid.g);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Sending info about other players to %lu", guid.g);
|
||||
|
||||
for (TPlayers::iterator pl = players->begin(); pl != players->end(); pl++) //sending other players to new player
|
||||
{
|
||||
|
@ -359,7 +359,7 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
|
|||
}
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_WARN, "- Done");
|
||||
LOG_APPEND(TimedLog::LOG_WARN, "- Done");
|
||||
|
||||
}
|
||||
|
||||
|
@ -485,31 +485,31 @@ int Networking::mainLoop()
|
|||
switch (packet->data[0])
|
||||
{
|
||||
case ID_REMOTE_DISCONNECTION_NOTIFICATION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Client at %s has disconnected", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Client at %s has disconnected", packet->systemAddress.ToString());
|
||||
break;
|
||||
case ID_REMOTE_CONNECTION_LOST:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Client at %s has lost connection", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Client at %s has lost connection", packet->systemAddress.ToString());
|
||||
break;
|
||||
case ID_REMOTE_NEW_INCOMING_CONNECTION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Client at %s has connected", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Client at %s has connected", packet->systemAddress.ToString());
|
||||
break;
|
||||
case ID_CONNECTION_REQUEST_ACCEPTED: // client to server
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Our connection request has been accepted");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Our connection request has been accepted");
|
||||
break;
|
||||
}
|
||||
case ID_NEW_INCOMING_CONNECTION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "A connection is incoming from %s", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "A connection is incoming from %s", packet->systemAddress.ToString());
|
||||
break;
|
||||
case ID_NO_FREE_INCOMING_CONNECTIONS:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "The server is full");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "The server is full");
|
||||
break;
|
||||
case ID_DISCONNECTION_NOTIFICATION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Client at %s has disconnected", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Client at %s has disconnected", packet->systemAddress.ToString());
|
||||
disconnectPlayer(packet->guid);
|
||||
break;
|
||||
case ID_CONNECTION_LOST:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Client at %s has lost connection", packet->systemAddress.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Client at %s has lost connection", packet->systemAddress.ToString());
|
||||
disconnectPlayer(packet->guid);
|
||||
break;
|
||||
case ID_SND_RECEIPT_ACKED:
|
||||
|
|
|
@ -12,13 +12,13 @@ using namespace std;
|
|||
|
||||
void Players::deletePlayer(RakNet::RakNetGUID guid)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %lu", guid.g);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Deleting player with guid %lu", guid.g);
|
||||
|
||||
if (players[guid] != 0)
|
||||
{
|
||||
CellController::get()->deletePlayer(players[guid]);
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Emptying slot %i", players[guid]->getId());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Emptying slot %i", players[guid]->getId());
|
||||
|
||||
slots[players[guid]->getId()] = 0;
|
||||
delete players[guid];
|
||||
|
@ -28,7 +28,7 @@ void Players::deletePlayer(RakNet::RakNetGUID guid)
|
|||
|
||||
void Players::newPlayer(RakNet::RakNetGUID guid)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Creating new player with guid %lu", guid.g);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Creating new player with guid %lu", guid.g);
|
||||
|
||||
players[guid] = new Player(guid);
|
||||
players[guid]->cell.blank();
|
||||
|
@ -43,7 +43,7 @@ void Players::newPlayer(RakNet::RakNetGUID guid)
|
|||
{
|
||||
if (slots[i] == 0)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Storing in slot %i", i);
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Storing in slot %i", i);
|
||||
|
||||
slots[i] = players[guid];
|
||||
slots[i]->setId(i);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <components/esm/loadnpc.hpp>
|
||||
#include <components/esm/loadcell.hpp>
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
#include "Cell.hpp"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Cells.hpp"
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||
|
@ -92,7 +92,7 @@ void CellFunctions::SetCell(unsigned short pid, const char *cellDescription) noe
|
|||
Player *player;
|
||||
GET_PLAYER(pid, player,);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Script is moving %s from %s to %s", player->npc.mName.c_str(),
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Script is moving %s from %s to %s", player->npc.mName.c_str(),
|
||||
player->cell.getDescription().c_str(), cellDescription);
|
||||
|
||||
player->cell = Utils::getCellFromDescription(cellDescription);
|
||||
|
@ -103,7 +103,7 @@ void CellFunctions::SetExteriorCell(unsigned short pid, int x, int y) noexcept
|
|||
Player *player;
|
||||
GET_PLAYER(pid, player,);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Script is moving %s from %s to %i,%i", player->npc.mName.c_str(),
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Script is moving %s from %s to %i,%i", player->npc.mName.c_str(),
|
||||
player->cell.getDescription().c_str(), x, y);
|
||||
|
||||
// If the player is currently in an interior, turn off the interior flag
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Chat.hpp"
|
||||
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||
#include <apps/openmw-mp/Networking.hpp>
|
||||
|
@ -13,7 +13,7 @@ void ChatFunctions::SendMessage(unsigned short pid, const char *message, bool se
|
|||
|
||||
player->chatMessage = message;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "System: %s", message);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "System: %s", message);
|
||||
|
||||
mwmp::PlayerPacket *packet = mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_CHAT_MESSAGE);
|
||||
packet->setPlayer(player);
|
||||
|
|
|
@ -157,12 +157,12 @@ void GUIFunctions::SendQuickKeyChanges(unsigned short pid) noexcept
|
|||
|
||||
void GUIFunctions::SetMapVisibility(unsigned short targetPid, unsigned short affectedPid, unsigned short state) noexcept
|
||||
{
|
||||
LOG_MESSAGE(Log::LOG_WARN, "stub");
|
||||
LOG_MESSAGE(TimedLog::LOG_WARN, "stub");
|
||||
}
|
||||
|
||||
void GUIFunctions::SetMapVisibilityAll(unsigned short targetPid, unsigned short state) noexcept
|
||||
{
|
||||
LOG_MESSAGE(Log::LOG_WARN, "stub");
|
||||
LOG_MESSAGE(TimedLog::LOG_WARN, "stub");
|
||||
}
|
||||
|
||||
// All methods below are deprecated versions of methods from above
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Mechanics.hpp"
|
||||
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||
#include <apps/openmw-mp/Networking.hpp>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "Miscellaneous.hpp"
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Networking.hpp>
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ void RecordsDynamicFunctions::SetRecordId(const char* id) noexcept
|
|||
else if (writeRecordsType == mwmp::RECORD_TYPE::LIGHT)
|
||||
tempLight.data.mId = id;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set id for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set id for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordBaseId(const char* baseId) noexcept
|
||||
|
@ -427,7 +427,7 @@ void RecordsDynamicFunctions::SetRecordBaseId(const char* baseId) noexcept
|
|||
else if (writeRecordsType == mwmp::RECORD_TYPE::LIGHT)
|
||||
tempLight.baseId = baseId;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set baseId for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set baseId for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordInventoryBaseId(const char* inventoryBaseId) noexcept
|
||||
|
@ -439,7 +439,7 @@ void RecordsDynamicFunctions::SetRecordInventoryBaseId(const char* inventoryBase
|
|||
else if (writeRecordsType == mwmp::RECORD_TYPE::NPC)
|
||||
tempNpc.inventoryBaseId = inventoryBaseId;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set inventoryBaseId for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set inventoryBaseId for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordSubtype(unsigned int subtype) noexcept
|
||||
|
@ -462,7 +462,7 @@ void RecordsDynamicFunctions::SetRecordSubtype(unsigned int subtype) noexcept
|
|||
tempApparatus.data.mData.mType = subtype;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set subtype for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set subtype for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ void RecordsDynamicFunctions::SetRecordName(const char* name) noexcept
|
|||
tempLight.data.mName = name;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set name for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set name for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -560,7 +560,7 @@ void RecordsDynamicFunctions::SetRecordModel(const char* model) noexcept
|
|||
tempLight.data.mModel = model;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set model for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set model for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -597,7 +597,7 @@ void RecordsDynamicFunctions::SetRecordIcon(const char* icon) noexcept
|
|||
tempLight.data.mIcon = icon;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set icon for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set icon for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -644,7 +644,7 @@ void RecordsDynamicFunctions::SetRecordScript(const char* script) noexcept
|
|||
tempLight.data.mScript = script;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set script for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set script for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -665,7 +665,7 @@ void RecordsDynamicFunctions::SetRecordEnchantmentId(const char* enchantmentId)
|
|||
tempWeapon.data.mEnchant = enchantmentId;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set enchantment id for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set enchantment id for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ void RecordsDynamicFunctions::SetRecordEnchantmentCharge(int enchantmentCharge)
|
|||
tempWeapon.data.mData.mEnchant = enchantmentCharge;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set enchantment charge for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set enchantment charge for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -716,7 +716,7 @@ void RecordsDynamicFunctions::SetRecordAutoCalc(int autoCalc) noexcept
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set autoCalc for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set autoCalc for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ void RecordsDynamicFunctions::SetRecordCharge(int charge) noexcept
|
|||
tempEnchantment.data.mData.mCharge = charge;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set charge for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set charge for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -748,7 +748,7 @@ void RecordsDynamicFunctions::SetRecordCost(int cost) noexcept
|
|||
tempEnchantment.data.mData.mCost = cost;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set cost for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set cost for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -773,7 +773,7 @@ void RecordsDynamicFunctions::SetRecordFlags(int flags) noexcept
|
|||
tempLight.data.mData.mFlags = flags;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set flags for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set flags for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ void RecordsDynamicFunctions::SetRecordValue(int value) noexcept
|
|||
tempLight.data.mData.mValue = value;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set value for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set value for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,7 @@ void RecordsDynamicFunctions::SetRecordWeight(double weight) noexcept
|
|||
tempLight.data.mData.mWeight = weight;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set weight for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set weight for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -870,7 +870,7 @@ void RecordsDynamicFunctions::SetRecordQuality(double quality) noexcept
|
|||
tempRepair.data.mData.mQuality = quality;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set quality for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set quality for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ void RecordsDynamicFunctions::SetRecordUses(int uses) noexcept
|
|||
tempRepair.data.mData.mUses = uses;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set number of uses for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set number of uses for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -904,7 +904,7 @@ void RecordsDynamicFunctions::SetRecordTime(int time) noexcept
|
|||
tempLight.data.mData.mTime = time;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set time for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set time for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -919,7 +919,7 @@ void RecordsDynamicFunctions::SetRecordRadius(int radius) noexcept
|
|||
tempLight.data.mData.mRadius = radius;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set radius for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set radius for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -934,7 +934,7 @@ void RecordsDynamicFunctions::SetRecordColor(unsigned int red, unsigned int gree
|
|||
tempLight.data.mData.mColor = red + (green << 8) + (blue << 16);
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set color for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set color for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -949,7 +949,7 @@ void RecordsDynamicFunctions::SetRecordArmorRating(int armorRating) noexcept
|
|||
tempArmor.data.mData.mArmor = armorRating;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set armor rating for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set armor rating for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -970,7 +970,7 @@ void RecordsDynamicFunctions::SetRecordHealth(int health) noexcept
|
|||
tempNpc.data.mNpdt.mHealth = health;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set health for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set health for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -988,7 +988,7 @@ void RecordsDynamicFunctions::SetRecordDamageChop(unsigned int minDamage, unsign
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set chop damage for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set chop damage for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ void RecordsDynamicFunctions::SetRecordDamageSlash(unsigned int minDamage, unsig
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set slash damage for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set slash damage for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ void RecordsDynamicFunctions::SetRecordDamageThrust(unsigned int minDamage, unsi
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set thrust damage for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set thrust damage for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ void RecordsDynamicFunctions::SetRecordReach(double reach) noexcept
|
|||
tempWeapon.data.mData.mReach = reach;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set reach for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set reach for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1054,7 +1054,7 @@ void RecordsDynamicFunctions::SetRecordSpeed(double speed) noexcept
|
|||
tempWeapon.data.mData.mSpeed = speed;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set speed for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set speed for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1069,7 +1069,7 @@ void RecordsDynamicFunctions::SetRecordKeyState(bool keyState) noexcept
|
|||
tempMiscellaneous.data.mData.mIsKey = keyState;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set key state for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set key state for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ void RecordsDynamicFunctions::SetRecordScrollState(bool scrollState) noexcept
|
|||
tempBook.data.mData.mIsScroll = scrollState;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set scroll state for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set scroll state for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ void RecordsDynamicFunctions::SetRecordSkillId(int skillId) noexcept
|
|||
tempBook.data.mData.mSkillId = skillId;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set skill id for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set skill id for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ void RecordsDynamicFunctions::SetRecordText(const char* text) noexcept
|
|||
tempBook.data.mText = text;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set text for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set text for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1129,7 +1129,7 @@ void RecordsDynamicFunctions::SetRecordHair(const char* hair) noexcept
|
|||
tempNpc.data.mHair = hair;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set hair for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set hair for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ void RecordsDynamicFunctions::SetRecordHead(const char* head) noexcept
|
|||
tempNpc.data.mHead = head;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set head for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set head for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1161,7 +1161,7 @@ void RecordsDynamicFunctions::SetRecordGender(unsigned int gender) noexcept
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set gender for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set gender for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1175,7 +1175,7 @@ void RecordsDynamicFunctions::SetRecordRace(const char* race) noexcept
|
|||
if (writeRecordsType == mwmp::RECORD_TYPE::NPC)
|
||||
tempNpc.data.mRace = race;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set race for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set race for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordClass(const char* charClass) noexcept
|
||||
|
@ -1185,7 +1185,7 @@ void RecordsDynamicFunctions::SetRecordClass(const char* charClass) noexcept
|
|||
if (writeRecordsType == mwmp::RECORD_TYPE::NPC)
|
||||
tempNpc.data.mClass = charClass;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set character class for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set character class for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordFaction(const char* faction) noexcept
|
||||
|
@ -1196,7 +1196,7 @@ void RecordsDynamicFunctions::SetRecordFaction(const char* faction) noexcept
|
|||
tempNpc.data.mFaction = faction;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set faction for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set faction for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1213,7 +1213,7 @@ void RecordsDynamicFunctions::SetRecordLevel(int level) noexcept
|
|||
tempNpc.data.mNpdt.mLevel = level;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set level for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set level for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1230,7 +1230,7 @@ void RecordsDynamicFunctions::SetRecordMagicka(int magicka) noexcept
|
|||
tempNpc.data.mNpdt.mMana = magicka;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set magicka for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set magicka for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1247,7 +1247,7 @@ void RecordsDynamicFunctions::SetRecordFatigue(int fatigue) noexcept
|
|||
tempNpc.data.mNpdt.mFatigue = fatigue;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set fatigue for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set fatigue for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1264,7 +1264,7 @@ void RecordsDynamicFunctions::SetRecordAIFight(int aiFight) noexcept
|
|||
tempNpc.data.mAiData.mFight = aiFight;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set AI fight for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set AI fight for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1281,7 +1281,7 @@ void RecordsDynamicFunctions::SetRecordAIFlee(int aiFlee) noexcept
|
|||
tempNpc.data.mAiData.mFlee = aiFlee;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set AI fight for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set AI fight for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1298,7 @@ void RecordsDynamicFunctions::SetRecordAIAlarm(int aiAlarm) noexcept
|
|||
tempNpc.data.mAiData.mAlarm = aiAlarm;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set AI fight for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set AI fight for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ void RecordsDynamicFunctions::SetRecordAIServices(int aiServices) noexcept
|
|||
tempNpc.data.mAiData.mServices = aiServices;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set AI services for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set AI services for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1330,7 +1330,7 @@ void RecordsDynamicFunctions::SetRecordSound(const char* sound) noexcept
|
|||
tempLight.data.mSound = sound;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set sound for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set sound for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1345,7 +1345,7 @@ void RecordsDynamicFunctions::SetRecordOpenSound(const char* sound) noexcept
|
|||
tempDoor.data.mOpenSound = sound;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set open sound for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set open sound for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ void RecordsDynamicFunctions::SetRecordCloseSound(const char* sound) noexcept
|
|||
tempDoor.data.mCloseSound = sound;
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set close sound for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set close sound for record type %i which lacks that property", writeRecordsType);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1386,7 +1386,7 @@ void RecordsDynamicFunctions::SetRecordIdByIndex(unsigned int index, const char*
|
|||
else if (writeRecordsType == mwmp::RECORD_TYPE::WEAPON)
|
||||
WorldstateFunctions::writeWorldstate.weaponRecords.at(index).data.mId = id;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set id for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set id for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordEnchantmentIdByIndex(unsigned int index, const char* enchantmentId) noexcept
|
||||
|
@ -1402,7 +1402,7 @@ void RecordsDynamicFunctions::SetRecordEnchantmentIdByIndex(unsigned int index,
|
|||
else if (writeRecordsType == mwmp::RECORD_TYPE::WEAPON)
|
||||
WorldstateFunctions::writeWorldstate.weaponRecords.at(index).data.mEnchant = enchantmentId;
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Tried to set enchantmentId for record type %i which lacks that property", writeRecordsType);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Tried to set enchantmentId for record type %i which lacks that property", writeRecordsType);
|
||||
}
|
||||
|
||||
void RecordsDynamicFunctions::SetRecordEffectId(unsigned int effectId) noexcept
|
||||
|
@ -1621,7 +1621,7 @@ void RecordsDynamicFunctions::AddRecordEffect() noexcept
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Could not add record effect to temporary ingredient record because the cap of %i effects has been reached",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Could not add record effect to temporary ingredient record because the cap of %i effects has been reached",
|
||||
effectCap);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <components/misc/stringops.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||
|
@ -33,7 +33,7 @@ void ServerFunctions::Kick(unsigned short pid) noexcept
|
|||
Player *player;
|
||||
GET_PLAYER(pid, player,);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Kicking player %s (%i)", player->npc.mName.c_str(), player->getId());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Kicking player %s (%i)", player->npc.mName.c_str(), player->getId());
|
||||
mwmp::Networking::getPtr()->kickPlayer(player->guid);
|
||||
player->setLoadState(Player::KICKED);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Settings.hpp"
|
||||
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||
#include <apps/openmw-mp/Networking.hpp>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Shapeshift.hpp"
|
||||
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
|
||||
#include <apps/openmw-mp/Networking.hpp>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <components/esm/attr.hpp>
|
||||
#include <components/esm/loadskil.hpp>
|
||||
#include <components/misc/stringops.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
#include <apps/openmw-mp/Networking.hpp>
|
||||
|
@ -294,7 +294,7 @@ void StatsFunctions::SetRace(unsigned short pid, const char *race) noexcept
|
|||
if (player->npc.mRace == race)
|
||||
return;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Setting race for %s: %s -> %s", player->npc.mName.c_str(),
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Setting race for %s: %s -> %s", player->npc.mName.c_str(),
|
||||
player->npc.mRace.c_str(), race);
|
||||
|
||||
player->npc.mRace = race;
|
||||
|
|
|
@ -186,7 +186,7 @@ void WorldstateFunctions::LoadMapTileImageFile(int cellX, int cellY, const char*
|
|||
|
||||
if (mapTile.imageData.size() > mwmp::maxImageDataSize)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Error loading image file for map tile: "
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Error loading image file for map tile: "
|
||||
"%s has a size of %i, which is over the maximum allowed of %i!",
|
||||
filePath, mapTile.imageData.size(), mwmp::maxImageDataSize);
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Script function pointer not found: %s", function.name);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Script function pointer not found: %s", function.name);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, e.what());
|
||||
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>(e.what());
|
||||
|
||||
if (!mwmp::Networking::getPtr()->getScriptErrorIgnoringState())
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "ScriptFunction.hpp"
|
||||
#include "Types.hpp"
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#ifndef __PRETTY_FUNCTION__
|
||||
#define __PRETTY_FUNCTION__ __FUNCTION__
|
||||
|
@ -37,7 +37,7 @@
|
|||
#define GET_PLAYER(pid, pl, retvalue) \
|
||||
pl = Players::getPlayer(pid); \
|
||||
if (player == 0) {\
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "%s: Player with pid \'%d\' not found\n", __PRETTY_FUNCTION__, pid);\
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "%s: Player with pid \'%d\' not found\n", __PRETTY_FUNCTION__, pid);\
|
||||
/*ScriptFunctions::StopServer(1);*/ \
|
||||
return retvalue;\
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
#include <components/esm/loadcell.hpp>
|
||||
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#if (!defined(DEBUG_PRINTF) && defined(DEBUG))
|
||||
#define DEBUG_PRINTF(...) LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, __VA_ARGS__)
|
||||
#define DEBUG_PRINTF(...) LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, __VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_PRINTF(...)
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <components/version/version.hpp>
|
||||
|
||||
#include <components/openmw-mp/ErrorMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
|
@ -157,8 +157,8 @@ int main(int argc, char *argv[])
|
|||
auto version = Version::getOpenmwVersion(variables["resources"].as<Files::EscapeHashString>().toStdString());
|
||||
|
||||
int logLevel = mgr.getInt("logLevel", "General");
|
||||
if (logLevel < Log::LOG_VERBOSE || logLevel > Log::LOG_FATAL)
|
||||
logLevel = Log::LOG_VERBOSE;
|
||||
if (logLevel < TimedLog::LOG_VERBOSE || logLevel > TimedLog::LOG_FATAL)
|
||||
logLevel = TimedLog::LOG_VERBOSE;
|
||||
|
||||
// Some objects used to redirect cout and cerr
|
||||
// Scope must be here, so this still works inside the catch block for logging exceptions
|
||||
|
@ -178,7 +178,7 @@ int main(int argc, char *argv[])
|
|||
// Redirect cout and cerr to tes3mp server log
|
||||
|
||||
logfile.open(boost::filesystem::path(
|
||||
cfgMgr.getLogPath() / "/tes3mp-server-" += Log::getFilenameTimestamp() += ".log"));
|
||||
cfgMgr.getLogPath() / "/tes3mp-server-" += TimedLog::getFilenameTimestamp() += ".log"));
|
||||
|
||||
coutsb.open(Tee(logfile, oldcout));
|
||||
cerrsb.open(Tee(logfile, oldcerr));
|
||||
|
@ -228,7 +228,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (RakNet::NonNumericHostString(address.c_str()))
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "You cannot use non-numeric addresses for the server.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "You cannot use non-numeric addresses for the server.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (mgr.getBool("enabled", "MasterServer"))
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sharing server query info to master enabled.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sharing server query info to master enabled.");
|
||||
string masterAddr = mgr.getString("address", "MasterServer");
|
||||
int masterPort = mgr.getInt("port", "MasterServer");
|
||||
int updateRate = mgr.getInt("rate", "MasterServer");
|
||||
|
@ -278,14 +278,14 @@ int main(int argc, char *argv[])
|
|||
if (Misc::StringUtils::ciEqual(masterAddr, "master.tes3mp.com") && masterPort == 25560)
|
||||
{
|
||||
masterPort = 25561;
|
||||
LOG_APPEND(Log::LOG_INFO, "- switching to port %i because the correct official master server for this version is on that port",
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- switching to port %i because the correct official master server for this version is on that port",
|
||||
masterPort);
|
||||
}
|
||||
|
||||
if (updateRate < 8000)
|
||||
{
|
||||
updateRate = 8000;
|
||||
LOG_APPEND(Log::LOG_INFO, "- switching to updateRate %i because the one in the server config was too low", updateRate);
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- switching to updateRate %i because the one in the server config was too low", updateRate);
|
||||
}
|
||||
|
||||
networking.InitQuery(masterAddr, (unsigned short) masterPort);
|
||||
|
@ -306,7 +306,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, e.what());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, e.what());
|
||||
Script::Call<Script::CallbackIdentity("OnServerScriptCrash")>(e.what());
|
||||
throw; //fall through
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ int main(int argc, char *argv[])
|
|||
RakNet::RakPeerInterface::DestroyInstance(peer);
|
||||
|
||||
if (code == 0)
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Quitting peacefully.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Quitting peacefully.");
|
||||
|
||||
LOG_QUIT();
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ bool ActorProcessor::Process(RakNet::Packet &packet, BaseActorList &actorList) n
|
|||
if (actorList.isValid)
|
||||
processor.second->Do(*myPacket, *player, actorList);
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ bool ObjectProcessor::Process(RakNet::Packet &packet, BaseObjectList &objectList
|
|||
if (objectList.isValid)
|
||||
processor.second->Do(*myPacket, *player, objectList);
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ bool WorldstateProcessor::Process(RakNet::Packet &packet, BaseWorldstate &worlds
|
|||
if (worldstate.isValid)
|
||||
processor.second->Do(*myPacket, *player, worldstate);
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
// Send only to players who have the cell loaded
|
||||
Cell *serverCell = CellController::get()->getCell(&actorList.cell);
|
||||
|
|
|
@ -15,8 +15,8 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_APPEND(Log::LOG_INFO, "- action: %i", objectList.action);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- action: %i", objectList.action);
|
||||
|
||||
// Don't have any hardcoded sync, and instead expect Lua scripts to forward
|
||||
// container packets to ensure their integrity based on what exists in the
|
||||
|
@ -24,7 +24,7 @@ namespace mwmp
|
|||
|
||||
Script::Call<Script::CallbackIdentity("OnContainer")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Finished processing ID_CONTAINER");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Finished processing ID_CONTAINER");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnObjectActivate")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnObjectDelete")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnObjectLock")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
for (unsigned int i = 0; i < objectList.baseObjectCount; i++)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnObjectScale")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
for (unsigned int i = 0; i < objectList.baseObjectCount; i++)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnObjectState")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnObjectTrap")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(ObjectPacket &packet, Player &player, BaseObjectList &objectList) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnVideoPlay")>(player.getId(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ namespace mwmp
|
|||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_APPEND(Log::LOG_INFO, "- Moved to %s", player.cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Moved to %s", player.cell.getDescription().c_str());
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerCellChange")>(player.getId());
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace mwmp
|
|||
|
||||
player.forEachLoaded([this](Player *pl, Player *other) {
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Started information exchange with %s", other->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Started information exchange with %s", other->npc.mName.c_str());
|
||||
|
||||
other->exchangeFullInfo = true;
|
||||
|
||||
|
@ -69,7 +69,7 @@ namespace mwmp
|
|||
|
||||
other->exchangeFullInfo = false;
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Finished information exchange with %s", other->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Finished information exchange with %s", other->npc.mName.c_str());
|
||||
});
|
||||
|
||||
playerController->GetPacket(ID_PLAYER_POSITION)->setPlayer(&player);
|
||||
|
@ -77,7 +77,7 @@ namespace mwmp
|
|||
packet.setPlayer(&player);
|
||||
packet.Send(true); //send to other clients
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Finished processing ID_PLAYER_CELL_CHANGE", player.cell.getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Finished processing ID_PLAYER_CELL_CHANGE", player.cell.getDescription().c_str());
|
||||
|
||||
player.exchangeFullInfo = false;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace mwmp
|
|||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
CellController::get()->update(&player);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace mwmp
|
|||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
player.creatureStats.mDead = true;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace mwmp
|
|||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
player.creatureStats.mDead = false;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
void Do(PlayerPacket &packet, Player &player) override
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
||||
|
||||
packet.Send(true);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "mwmp/Main.hpp"
|
||||
#include "mwmp/GUIController.hpp"
|
||||
/*
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/ErrorMessages.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
/*
|
||||
|
@ -237,8 +237,8 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
|||
|
||||
if (!hasValidCredits)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_FATAL, "The client is shutting down");
|
||||
LOG_APPEND(Log::LOG_FATAL, "- %s", TES3MP_CREDITS_ERROR);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_FATAL, "The client is shutting down");
|
||||
LOG_APPEND(TimedLog::LOG_FATAL, "- %s", TES3MP_CREDITS_ERROR);
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "tes3mp", TES3MP_CREDITS_ERROR, 0);
|
||||
return false;
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ int main(int argc, char**argv)
|
|||
Instead of logging information in openmw.log, use a more descriptive filename
|
||||
that includes a timestamp
|
||||
*/
|
||||
return wrapApplication(&runApplication, argc, argv, "/tes3mp-client-" + Log::getFilenameTimestamp() + ".log");
|
||||
return wrapApplication(&runApplication, argc, argv, "/tes3mp-client-" + TimedLog::getFilenameTimestamp() + ".log");
|
||||
/*
|
||||
End of tes3mp change (major)
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
#include "../mwmp/PlayerList.hpp"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
#include "../mwmp/PlayerList.hpp"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
|
@ -128,7 +128,7 @@ namespace MWGui
|
|||
objectList->addObject(baseObject);
|
||||
objectList->sendContainer();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i\n- cell: %s\n- item: %s, %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i\n- cell: %s\n- item: %s, %i",
|
||||
baseObject.refId.c_str(), baseObject.refNum, objectList->cell.getDescription().c_str(),
|
||||
itemPtr.getCellRef().getRefId().c_str(), itemPtr.getRefData().getCount());
|
||||
/*
|
||||
|
@ -186,7 +186,7 @@ namespace MWGui
|
|||
objectList->addObject(baseObject);
|
||||
objectList->sendContainer();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s %i-%i\n- cell: %s\n- item: %s %i, %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s %i-%i\n- cell: %s\n- item: %s %i, %i",
|
||||
baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum, objectList->cell.getDescription().c_str(),
|
||||
containerItem.refId.c_str(), containerItem.count, containerItem.charge);
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ namespace MWGui
|
|||
objectList->addEntireContainer(mPtr);
|
||||
objectList->sendContainer();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i-%i\n- cell: %s",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i-%i\n- cell: %s",
|
||||
mPtr.getCellRef().getRefId().c_str(), mPtr.getCellRef().getRefNum().mIndex, mPtr.getCellRef().getMpNum(),
|
||||
objectList->cell.getDescription().c_str());
|
||||
/*
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
/*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/GUIController.hpp"
|
||||
/*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
|
@ -1239,7 +1239,7 @@ namespace MWMechanics
|
|||
|
||||
npcStats.setCrimeId(-1);
|
||||
npcStats.setCrimeTime(time(0));
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "NPC %s %i-%i has forgiven player's crimes after the player's death",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "NPC %s %i-%i has forgiven player's crimes after the player's death",
|
||||
ptr.getCellRef().getRefId().c_str(), ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/MechanicsHelper.hpp"
|
||||
#include "../mwgui/windowmanagerimp.hpp"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwgui/windowmanagerimp.hpp"
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
|
@ -97,7 +97,7 @@ bool AiPursue::execute (const MWWorld::Ptr& actor, CharacterController& characte
|
|||
|
||||
Close the player's inventory or open container and cancel any drag and drops
|
||||
*/
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "After being pursued by %s, diedSinceArrestAttempt is now false", actor.getCellRef().getRefId().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "After being pursued by %s, diedSinceArrestAttempt is now false", actor.getCellRef().getRefId().c_str());
|
||||
mwmp::Main::get().getLocalPlayer()->diedSinceArrestAttempt = false;
|
||||
mwmp::Main::get().getLocalPlayer()->closeInventoryWindows();
|
||||
/*
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
#include "../mwmp/Worldstate.hpp"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
#include "../mwmp/LocalActor.hpp"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/LocalPlayer.hpp"
|
||||
#include "../mwmp/PlayerList.hpp"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "spellcasting.hpp"
|
||||
/*
|
||||
End of tes3mp addition
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
#include "../mwmp/Worldstate.hpp"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
#include "../mwmp/PlayerList.hpp"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include "../mwmechanics/creaturestats.hpp"
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/Networking.hpp"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
using namespace std;
|
||||
|
@ -96,17 +96,17 @@ void ActorList::addAiActor(const MWWorld::Ptr& actorPtr, const MWWorld::Ptr& tar
|
|||
baseActor.aiAction = aiAction;
|
||||
baseActor.aiTarget = MechanicsHelper::getTarget(targetPtr);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Preparing to send ID_ACTOR_AI about %s %i-%i\n- action: %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Preparing to send ID_ACTOR_AI about %s %i-%i\n- action: %i",
|
||||
actorPtr.getCellRef().getRefId().c_str(), baseActor.refNum, baseActor.mpNum, aiAction);
|
||||
|
||||
if (baseActor.aiTarget.isPlayer)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "- Has player target %s",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "- Has player target %s",
|
||||
targetPtr.getClass().getName(targetPtr).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "- Has actor target %s %i-%i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "- Has actor target %s %i-%i",
|
||||
targetPtr.getCellRef().getRefId().c_str(), baseActor.aiTarget.refNum, baseActor.aiTarget.mpNum);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <components/esm/cellid.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
|
@ -64,7 +64,7 @@ void Cell::updateLocal(bool forceUpdate)
|
|||
// If the cell this actor has moved to is under our authority, move them to it
|
||||
if (cellController->hasLocalAuthority(actor->cell))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Moving LocalActor %s to our authority in %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Moving LocalActor %s to our authority in %s",
|
||||
mapIndex.c_str(), actor->cell.getDescription().c_str());
|
||||
Cell *newCell = cellController->getCell(actor->cell);
|
||||
newCell->localActors[mapIndex] = actor;
|
||||
|
@ -72,7 +72,7 @@ void Cell::updateLocal(bool forceUpdate)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Deleting LocalActor %s which is no longer under our authority",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Deleting LocalActor %s which is no longer under our authority",
|
||||
mapIndex.c_str(), getDescription().c_str());
|
||||
cellController->removeLocalActorRecord(mapIndex);
|
||||
delete actor;
|
||||
|
@ -301,7 +301,7 @@ void Cell::readAttack(ActorList& actorList)
|
|||
|
||||
if (dedicatedActors.count(mapIndex) > 0)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Reading ActorAttack about %s", mapIndex.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Reading ActorAttack about %s", mapIndex.c_str());
|
||||
|
||||
DedicatedActor *actor = dedicatedActors[mapIndex];
|
||||
actor->attack = baseActor.attack;
|
||||
|
@ -341,7 +341,7 @@ void Cell::readCellChange(ActorList& actorList)
|
|||
// Is a packet mistakenly moving the actor to the cell it's already in? If so, ignore it
|
||||
if (Misc::StringUtils::ciEqual(getDescription(), baseActor.cell.getDescription()))
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Server says DedicatedActor %s moved to %s, but it was already there",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Server says DedicatedActor %s moved to %s, but it was already there",
|
||||
mapIndex.c_str(), getDescription().c_str());
|
||||
continue;
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ void Cell::readCellChange(ActorList& actorList)
|
|||
dedicatedActor->position = baseActor.position;
|
||||
dedicatedActor->direction = baseActor.direction;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Server says DedicatedActor %s moved to %s",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Server says DedicatedActor %s moved to %s",
|
||||
mapIndex.c_str(), dedicatedActor->cell.getDescription().c_str());
|
||||
|
||||
MWWorld::CellStore *newStore = cellController->getCellStore(dedicatedActor->cell);
|
||||
|
@ -362,7 +362,7 @@ void Cell::readCellChange(ActorList& actorList)
|
|||
// If the cell this actor has moved to is active and not under our authority, move them to it
|
||||
if (cellController->isActiveWorldCell(dedicatedActor->cell) && !cellController->hasLocalAuthority(dedicatedActor->cell))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Moving DedicatedActor %s to our active cell %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Moving DedicatedActor %s to our active cell %s",
|
||||
mapIndex.c_str(), dedicatedActor->cell.getDescription().c_str());
|
||||
cellController->initializeCell(dedicatedActor->cell);
|
||||
Cell *newCell = cellController->getCell(dedicatedActor->cell);
|
||||
|
@ -373,7 +373,7 @@ void Cell::readCellChange(ActorList& actorList)
|
|||
{
|
||||
if (cellController->hasLocalAuthority(dedicatedActor->cell))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Creating new LocalActor based on %s in %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Creating new LocalActor based on %s in %s",
|
||||
mapIndex.c_str(), dedicatedActor->cell.getDescription().c_str());
|
||||
Cell *newCell = cellController->getCell(dedicatedActor->cell);
|
||||
LocalActor *localActor = new LocalActor();
|
||||
|
@ -390,7 +390,7 @@ void Cell::readCellChange(ActorList& actorList)
|
|||
cellController->setLocalActorRecord(mapIndex, newCell->getDescription());
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Deleting DedicatedActor %s which is no longer needed",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Deleting DedicatedActor %s which is no longer needed",
|
||||
mapIndex.c_str(), getDescription().c_str());
|
||||
cellController->removeDedicatedActorRecord(mapIndex);
|
||||
delete dedicatedActor;
|
||||
|
@ -404,7 +404,7 @@ void Cell::readCellChange(ActorList& actorList)
|
|||
void Cell::initializeLocalActor(const MWWorld::Ptr& ptr)
|
||||
{
|
||||
std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr);
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Initializing LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Initializing LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
|
||||
LocalActor *actor = new LocalActor();
|
||||
actor->cell = *store->getCell();
|
||||
|
@ -419,12 +419,12 @@ void Cell::initializeLocalActor(const MWWorld::Ptr& ptr)
|
|||
|
||||
Main::get().getCellController()->setLocalActorRecord(mapIndex, getDescription());
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Successfully initialized LocalActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
}
|
||||
|
||||
void Cell::initializeLocalActors()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Initializing LocalActors in %s", getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Initializing LocalActors in %s", getDescription().c_str());
|
||||
|
||||
for (const auto &mergedRef : store->getMergedRefs())
|
||||
{
|
||||
|
@ -443,13 +443,13 @@ void Cell::initializeLocalActors()
|
|||
}
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized LocalActors in %s", getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Successfully initialized LocalActors in %s", getDescription().c_str());
|
||||
}
|
||||
|
||||
void Cell::initializeDedicatedActor(const MWWorld::Ptr& ptr)
|
||||
{
|
||||
std::string mapIndex = Main::get().getCellController()->generateMapIndex(ptr);
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Initializing DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Initializing DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
|
||||
DedicatedActor *actor = new DedicatedActor();
|
||||
actor->cell = *store->getCell();
|
||||
|
@ -459,7 +459,7 @@ void Cell::initializeDedicatedActor(const MWWorld::Ptr& ptr)
|
|||
|
||||
Main::get().getCellController()->setDedicatedActorRecord(mapIndex, getDescription());
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Successfully initialized DedicatedActor %s in %s", mapIndex.c_str(), getDescription().c_str());
|
||||
}
|
||||
|
||||
void Cell::initializeDedicatedActors(ActorList& actorList)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <components/esm/cellid.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -77,7 +77,7 @@ void CellController::initializeCell(const ESM::Cell& cell)
|
|||
// If this key doesn't exist, create it
|
||||
if (cellsInitialized.count(mapIndex) == 0)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Initializing mwmp::Cell %s", cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Initializing mwmp::Cell %s", cell.getDescription().c_str());
|
||||
|
||||
MWWorld::CellStore *cellStore = getCellStore(cell);
|
||||
|
||||
|
@ -86,7 +86,7 @@ void CellController::initializeCell(const ESM::Cell& cell)
|
|||
mwmp::Cell *mpCell = new mwmp::Cell(cellStore);
|
||||
cellsInitialized[mapIndex] = mpCell;
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Successfully initialized mwmp::Cell %s", cell.getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Successfully initialized mwmp::Cell %s", cell.getDescription().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
|
@ -209,18 +209,18 @@ void DedicatedActor::setAi()
|
|||
MWMechanics::CreatureStats *ptrCreatureStats = &ptr.getClass().getCreatureStats(ptr);
|
||||
ptrCreatureStats->setAiSetting(MWMechanics::CreatureStats::AI_Fight, 0);
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- actor cellRef: %s %i-%i",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- actor cellRef: %s %i-%i",
|
||||
ptr.getCellRef().getRefId().c_str(), ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum());
|
||||
|
||||
if (aiAction == mwmp::BaseActorList::CANCEL)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Cancelling AI sequence");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Cancelling AI sequence");
|
||||
|
||||
ptrCreatureStats->getAiSequence().clear();
|
||||
}
|
||||
else if (aiAction == mwmp::BaseActorList::TRAVEL)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Travelling to %f, %f, %f",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Travelling to %f, %f, %f",
|
||||
aiCoordinates.pos[0], aiCoordinates.pos[1], aiCoordinates.pos[2]);
|
||||
|
||||
MWMechanics::AiTravel package(aiCoordinates.pos[0], aiCoordinates.pos[1], aiCoordinates.pos[2]);
|
||||
|
@ -228,7 +228,7 @@ void DedicatedActor::setAi()
|
|||
}
|
||||
else if (aiAction == mwmp::BaseActorList::WANDER)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Wandering for distance %i and duration %i, repetition is %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Wandering for distance %i and duration %i, repetition is %s",
|
||||
aiDistance, aiDuration, aiShouldRepeat ? "true" : "false");
|
||||
|
||||
std::vector<unsigned char> idleList;
|
||||
|
@ -244,7 +244,7 @@ void DedicatedActor::setAi()
|
|||
{
|
||||
targetPtr = MechanicsHelper::getPlayerPtr(aiTarget);
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Has player target %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Has player target %s",
|
||||
targetPtr.getClass().getName(targetPtr).c_str());
|
||||
}
|
||||
else
|
||||
|
@ -258,12 +258,12 @@ void DedicatedActor::setAi()
|
|||
|
||||
if (targetPtr)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Has actor target %s %i-%i",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Has actor target %s %i-%i",
|
||||
targetPtr.getCellRef().getRefId().c_str(), aiTarget.refNum, aiTarget.mpNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Has invalid actor target %i-%i",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Has invalid actor target %i-%i",
|
||||
aiTarget.refNum, aiTarget.mpNum);
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ void DedicatedActor::setAi()
|
|||
{
|
||||
if (aiAction == mwmp::BaseActorList::ACTIVATE)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Activating target");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Activating target");
|
||||
|
||||
MWMechanics::AiActivate package(targetPtr);
|
||||
ptrCreatureStats->getAiSequence().stack(package, ptr, true);
|
||||
|
@ -281,14 +281,14 @@ void DedicatedActor::setAi()
|
|||
|
||||
if (aiAction == mwmp::BaseActorList::COMBAT)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Starting combat with target");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Starting combat with target");
|
||||
|
||||
MWMechanics::AiCombat package(targetPtr);
|
||||
ptrCreatureStats->getAiSequence().stack(package, ptr, true);
|
||||
}
|
||||
else if (aiAction == mwmp::BaseActorList::ESCORT)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Being escorted by target, for duration %i, to coordinates %f, %f, %f",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Being escorted by target, for duration %i, to coordinates %f, %f, %f",
|
||||
aiDuration, aiCoordinates.pos[0], aiCoordinates.pos[1], aiCoordinates.pos[2]);
|
||||
|
||||
MWMechanics::AiEscort package(targetPtr.getCellRef().getRefId(), aiDuration,
|
||||
|
@ -297,7 +297,7 @@ void DedicatedActor::setAi()
|
|||
}
|
||||
else if (aiAction == mwmp::BaseActorList::FOLLOW)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Following target");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Following target");
|
||||
|
||||
MWMechanics::AiFollow package(targetPtr);
|
||||
package.allowAnyDistance(true);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <boost/algorithm/clamp.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <apps/openmw/mwmechanics/steering.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -193,14 +193,14 @@ void DedicatedPlayer::setShapeshift()
|
|||
creature.mScript = "";
|
||||
if (!displayCreatureName)
|
||||
creature.mName = npc.mName;
|
||||
LOG_APPEND(Log::LOG_INFO, "- %s is disguised as %s", npc.mName.c_str(), creatureRefId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- %s is disguised as %s", npc.mName.c_str(), creatureRefId.c_str());
|
||||
|
||||
// Is this our first time creating a creature record id for this player? If so, keep it around
|
||||
// and reuse it
|
||||
if (creatureRecordId.empty())
|
||||
{
|
||||
creature.mId = creatureRecordId = RecordHelper::createCreatureRecord(creature);
|
||||
LOG_APPEND(Log::LOG_INFO, "- Creating new creature record %s", creatureRecordId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Creating new creature record %s", creatureRecordId.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ void DedicatedPlayer::setShapeshift()
|
|||
RecordHelper::overrideCreatureRecord(creature);
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Creating reference for %s", creature.mId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Creating reference for %s", creature.mId.c_str());
|
||||
createReference(creature.mId);
|
||||
}
|
||||
// This player was already a creature, but the new creature refId was empty or
|
||||
|
@ -361,14 +361,14 @@ void DedicatedPlayer::setCell()
|
|||
|
||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Server says DedicatedPlayer %s moved to %s",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Server says DedicatedPlayer %s moved to %s",
|
||||
npc.mName.c_str(), cell.getDescription().c_str());
|
||||
|
||||
MWWorld::CellStore *cellStore = Main::get().getCellController()->getCellStore(cell);
|
||||
|
||||
if (!cellStore)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Cell doesn't exist on this client");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "%s", "- Cell doesn't exist on this client");
|
||||
world->disable(getPtr());
|
||||
return;
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ void DedicatedPlayer::createReference(const std::string& recId)
|
|||
|
||||
reference = new MWWorld::ManualRef(world->getStore(), recId, 1);
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Creating new reference pointer for %s", npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Creating new reference pointer for %s", npc.mName.c_str());
|
||||
|
||||
ptr = world->placeObject(reference->getPtr(), Main::get().getCellController()->getCellStore(cell), position);
|
||||
|
||||
|
@ -482,7 +482,7 @@ void DedicatedPlayer::deleteReference()
|
|||
{
|
||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Deleting reference");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Deleting reference");
|
||||
world->deleteObject(ptr);
|
||||
delete reference;
|
||||
reference = nullptr;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "apps/openmw/mwgui/windowmanagerimp.hpp"
|
||||
#include "apps/openmw/mwinput/inputmanagerimp.hpp"
|
||||
#include <MyGUI_InputManager.h>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../Networking.hpp"
|
||||
#include "../Main.hpp"
|
||||
|
@ -83,7 +83,7 @@ namespace mwmp
|
|||
return;
|
||||
}
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Player: %s", cm.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Player: %s", cm.c_str());
|
||||
|
||||
// Add the command to the history, and set the current pointer to
|
||||
// the end of the list
|
||||
|
@ -121,12 +121,12 @@ namespace mwmp
|
|||
if(msg.size() == 0)
|
||||
{
|
||||
clean();
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Chat cleaned");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Chat cleaned");
|
||||
}
|
||||
else
|
||||
{
|
||||
mHistory->addText(color + msg);
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", msg.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "%s", msg.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ namespace mwmp
|
|||
windowState == CHAT_ENABLED ? "Chat visible" :
|
||||
"Chat appearing when needed";
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Switch chat mode to %s", chatMode.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Switch chat mode to %s", chatMode.c_str());
|
||||
MWBase::Environment::get().getWindowManager()->messageBox(chatMode);
|
||||
|
||||
switch (windowState)
|
||||
|
@ -197,7 +197,7 @@ namespace mwmp
|
|||
return;
|
||||
|
||||
if (!mCommandLine->getVisible())
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Opening chat.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Opening chat.");
|
||||
|
||||
if (windowState == CHAT_HIDDENMODE)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Created by koncord on 03.11.16.
|
||||
//
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "apps/openmw/mwbase/environment.hpp"
|
||||
#include "apps/openmw/mwgui/windowmanagerimp.hpp"
|
||||
|
@ -45,12 +45,12 @@ void GUIDialogList::mousePressed(MyGUI::Widget * /*widget*/)
|
|||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->setPlayer(Main::get().getLocalPlayer());
|
||||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->Send();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Selected id: %d", id);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Selected id: %d", id);
|
||||
if (id == MyGUI::ITEM_NONE)
|
||||
return;
|
||||
|
||||
std::string itemName = mListBox->getItemNameAt(mListBox->getIndexSelected()).asUTF8();
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "name of item: '%s'", itemName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "name of item: '%s'", itemName.c_str());
|
||||
}
|
||||
|
||||
void GUIDialogList::onFrame(float frameDuration)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Created by koncord on 20.07.16.
|
||||
//
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
||||
|
||||
#include <SDL_system.h>
|
||||
|
@ -219,7 +219,7 @@ void mwmp::GUIController::update(float dt)
|
|||
|
||||
if (pressedButton != -1 && calledInteractiveMessage)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Pressed: %d", pressedButton);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Pressed: %d", pressedButton);
|
||||
calledInteractiveMessage = false;
|
||||
Main::get().getLocalPlayer()->guiMessageBox.data = MyGUI::utility::toString(pressedButton);
|
||||
Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->setPlayer(Main::get().getLocalPlayer());
|
||||
|
@ -285,7 +285,7 @@ ESM::CustomMarker mwmp::GUIController::createMarker(const RakNet::RakNetGUID &gu
|
|||
ESM::CustomMarker mEditingMarker;
|
||||
if (!player)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Unknown player guid: %s", guid.ToString());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Unknown player guid: %s", guid.ToString());
|
||||
return mEditingMarker;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
|
@ -68,10 +68,10 @@ void LocalActor::update(bool forceUpdate)
|
|||
|
||||
void LocalActor::updateCell()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_ACTOR_CELL_CHANGE about %s %i-%i in cell %s to server",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_ACTOR_CELL_CHANGE about %s %i-%i in cell %s to server",
|
||||
refId.c_str(), refNum, mpNum, cell.getDescription().c_str());
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Moved to cell %s", ptr.getCell()->getCell()->getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Moved to cell %s", ptr.getCell()->getCell()->getDescription().c_str());
|
||||
|
||||
cell = *ptr.getCell()->getCell();
|
||||
position = ptr.getRefData().getPosition();
|
||||
|
@ -194,7 +194,7 @@ void LocalActor::updateStatsDynamic(bool forceUpdate)
|
|||
if (MechanicsHelper::isEmptyTarget(killer))
|
||||
killer = MechanicsHelper::getTarget(ptr);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_ACTOR_DEATH about %s %i-%i in cell %s to server",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_ACTOR_DEATH about %s %i-%i in cell %s to server",
|
||||
refId.c_str(), refNum, mpNum, cell.getDescription().c_str());
|
||||
|
||||
mwmp::Main::get().getNetworking()->getActorList()->addDeathActor(*this);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <components/esm/esmwriter.hpp>
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -170,7 +170,7 @@ bool LocalPlayer::processCharGen()
|
|||
npc = *ptrPlayer.get<ESM::NPC>()->mBase;
|
||||
birthsign = world->getPlayer().getBirthSign();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_BASEINFO to server with my CharGen info");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_BASEINFO to server with my CharGen info");
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_BASEINFO)->setPlayer(this);
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_BASEINFO)->Send();
|
||||
|
||||
|
@ -258,7 +258,7 @@ void LocalPlayer::updateStatsDynamic(bool forceUpdate)
|
|||
if (MechanicsHelper::isEmptyTarget(killer))
|
||||
killer = MechanicsHelper::getTarget(getPlayerPtr());
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_DEATH about myself to server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_DEATH about myself to server");
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_DEATH)->setPlayer(this);
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_DEATH)->Send();
|
||||
|
||||
|
@ -439,14 +439,14 @@ void LocalPlayer::updateCell(bool forceUpdate)
|
|||
// If the LocalPlayer's Ptr cell is different from the LocalPlayer's packet cell, proceed
|
||||
if (forceUpdate || !Main::get().getCellController()->isSameCell(*ptrCell, cell))
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_CELL_CHANGE about LocalPlayer to server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_CELL_CHANGE about LocalPlayer to server");
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- Moved from %s to %s", cell.getDescription().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Moved from %s to %s", cell.getDescription().c_str(),
|
||||
ptrCell->getDescription().c_str());
|
||||
|
||||
if (!Misc::StringUtils::ciEqual(cell.mRegion, ptrCell->mRegion))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Changed region from %s to %s",
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Changed region from %s to %s",
|
||||
cell.mRegion.empty() ? "none" : cell.mRegion.c_str(),
|
||||
ptrCell->mRegion.empty() ? "none" : ptrCell->mRegion.c_str());
|
||||
|
||||
|
@ -705,7 +705,7 @@ void LocalPlayer::addItems()
|
|||
}
|
||||
catch (std::exception&)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignored addition of invalid inventory item %s", item.refId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignored addition of invalid inventory item %s", item.refId.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ void LocalPlayer::addSpells()
|
|||
if (MWBase::Environment::get().getWorld()->getStore().get<ESM::Spell>().search(spell.mId))
|
||||
ptrSpells.add(spell.mId);
|
||||
else
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignored addition of invalid spell %s", spell.mId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignored addition of invalid spell %s", spell.mId.c_str());
|
||||
}
|
||||
|
||||
void LocalPlayer::addJournalItems()
|
||||
|
@ -758,7 +758,7 @@ void LocalPlayer::addJournalItems()
|
|||
}
|
||||
catch (std::exception&)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignored addition of invalid journal quest %s", journalItem.quest.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignored addition of invalid journal quest %s", journalItem.quest.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -837,7 +837,7 @@ void LocalPlayer::resurrect()
|
|||
|
||||
deathTime = time(0);
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- diedSinceArrestAttempt is now true");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- diedSinceArrestAttempt is now true");
|
||||
|
||||
// Record that we are no longer a known werewolf, to avoid being attacked infinitely
|
||||
MWBase::Environment::get().getWorld()->setGlobalInt("pcknownwerewolf", 0);
|
||||
|
@ -903,7 +903,7 @@ void LocalPlayer::setCharacter()
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Character update was ignored due to invalid race %s", npc.mRace.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Character update was ignored due to invalid race %s", npc.mRace.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ void LocalPlayer::setCell()
|
|||
// packet about our position in that cell
|
||||
catch (std::exception&)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "%s", "- Cell doesn't exist on this client");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "%s", "- Cell doesn't exist on this client");
|
||||
ignorePosPacket = true;
|
||||
}
|
||||
}
|
||||
|
@ -1097,7 +1097,7 @@ void LocalPlayer::setCell()
|
|||
|
||||
void LocalPlayer::setClass()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_CLASS from server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_CLASS from server");
|
||||
|
||||
if (charClass.mId.empty()) // custom class
|
||||
{
|
||||
|
@ -1115,7 +1115,7 @@ void LocalPlayer::setClass()
|
|||
MWBase::Environment::get().getWindowManager()->setPlayerClass(charClass);
|
||||
}
|
||||
else
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignored invalid default class %s", charClass.mId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignored invalid default class %s", charClass.mId.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ void LocalPlayer::setEquipment()
|
|||
}
|
||||
catch (std::exception&)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignored addition of invalid equipment item %s", currentItem.refId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignored addition of invalid equipment item %s", currentItem.refId.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1217,11 +1217,11 @@ void LocalPlayer::setQuickKeys()
|
|||
{
|
||||
MWWorld::Ptr ptrPlayer = getPlayerPtr();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_QUICKKEYS from server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_QUICKKEYS from server");
|
||||
|
||||
for (const auto &quickKey : quickKeyChanges.quickKeys)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- slot: %i, type: %i, itemId: %s", quickKey.slot, quickKey.type, quickKey.itemId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- slot: %i, type: %i, itemId: %s", quickKey.slot, quickKey.type, quickKey.itemId.c_str());
|
||||
|
||||
if (quickKey.type == QuickKey::ITEM || quickKey.type == QuickKey::ITEM_MAGIC)
|
||||
{
|
||||
|
@ -1263,7 +1263,7 @@ void LocalPlayer::setFactions()
|
|||
MWWorld::Ptr ptrPlayer = getPlayerPtr();
|
||||
MWMechanics::NpcStats &ptrNpcStats = ptrPlayer.getClass().getNpcStats(ptrPlayer);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_FACTION from server\n- action: %i", factionChanges.action);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_FACTION from server\n- action: %i", factionChanges.action);
|
||||
|
||||
for (const auto &faction : factionChanges.factions)
|
||||
{
|
||||
|
@ -1271,7 +1271,7 @@ void LocalPlayer::setFactions()
|
|||
|
||||
if (!esmFaction)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignored invalid faction %s", faction.factionId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignored invalid faction %s", faction.factionId.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1311,12 +1311,12 @@ void LocalPlayer::setFactions()
|
|||
|
||||
void LocalPlayer::setKills()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_WORLD_KILL_COUNT with the following kill counts:");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_WORLD_KILL_COUNT with the following kill counts:");
|
||||
std::string debugMessage = "";
|
||||
|
||||
for (const auto &kill : killChanges.kills)
|
||||
{
|
||||
if (Log::GetLevel() <= Log::LOG_INFO)
|
||||
if (TimedLog::GetLevel() <= TimedLog::LOG_INFO)
|
||||
{
|
||||
if (!debugMessage.empty())
|
||||
debugMessage += ", ";
|
||||
|
@ -1327,7 +1327,7 @@ void LocalPlayer::setKills()
|
|||
MWBase::Environment::get().getMechanicsManager()->setDeaths(kill.refId, kill.number);
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- %s", debugMessage.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- %s", debugMessage.c_str());
|
||||
}
|
||||
|
||||
void LocalPlayer::setBooks()
|
||||
|
@ -1391,7 +1391,7 @@ void LocalPlayer::sendClass()
|
|||
|
||||
void LocalPlayer::sendInventory()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending entire inventory to server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending entire inventory to server");
|
||||
|
||||
MWWorld::Ptr ptrPlayer = getPlayerPtr();
|
||||
MWWorld::InventoryStore &ptrInventory = ptrPlayer.getClass().getInventoryStore(ptrPlayer);
|
||||
|
@ -1426,7 +1426,7 @@ void LocalPlayer::sendInventory()
|
|||
|
||||
void LocalPlayer::sendItemChange(const mwmp::Item& item, unsigned int action)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending item change for %s with action %i, count %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending item change for %s with action %i, count %i",
|
||||
item.refId.c_str(), action, item.count);
|
||||
|
||||
inventoryChanges.items.clear();
|
||||
|
@ -1445,7 +1445,7 @@ void LocalPlayer::sendItemChange(const MWWorld::Ptr& itemPtr, int count, unsigne
|
|||
|
||||
void LocalPlayer::sendItemChange(const std::string& refId, int count, unsigned int action)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending item change for %s with action %i, count %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending item change for %s with action %i, count %i",
|
||||
refId.c_str(), action, count);
|
||||
|
||||
inventoryChanges.items.clear();
|
||||
|
@ -1509,8 +1509,8 @@ void LocalPlayer::sendQuickKey(unsigned short slot, int type, const std::string&
|
|||
quickKey.type = type;
|
||||
quickKey.itemId = itemId;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_QUICKKEYS", itemId.c_str());
|
||||
LOG_APPEND(Log::LOG_INFO, "- slot: %i, type: %i, itemId: %s", quickKey.slot, quickKey.type, quickKey.itemId.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_QUICKKEYS", itemId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- slot: %i, type: %i, itemId: %s", quickKey.slot, quickKey.type, quickKey.itemId.c_str());
|
||||
|
||||
quickKeyChanges.quickKeys.push_back(quickKey);
|
||||
|
||||
|
@ -1607,7 +1607,7 @@ void LocalPlayer::sendTopic(const std::string& topicId)
|
|||
else
|
||||
topic.topicId = topicId;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_TOPIC with topic %s", topic.topicId.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_TOPIC with topic %s", topic.topicId.c_str());
|
||||
|
||||
topicChanges.topics.push_back(topic);
|
||||
|
||||
|
@ -1623,7 +1623,7 @@ void LocalPlayer::sendKill(const std::string& refId, int number)
|
|||
kill.refId = refId;
|
||||
kill.number = number;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_WORLD_KILL_COUNT with refId %s, number %i", refId.c_str(), number);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_WORLD_KILL_COUNT with refId %s, number %i", refId.c_str(), number);
|
||||
|
||||
killChanges.kills.push_back(kill);
|
||||
|
||||
|
@ -1638,7 +1638,7 @@ void LocalPlayer::sendBook(const std::string& bookId)
|
|||
mwmp::Book book;
|
||||
book.bookId = bookId;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_BOOK with book %s", book.bookId.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_BOOK with book %s", book.bookId.c_str());
|
||||
|
||||
bookChanges.books.push_back(book);
|
||||
|
||||
|
@ -1650,7 +1650,7 @@ void LocalPlayer::sendWerewolfState(bool werewolfState)
|
|||
{
|
||||
isWerewolf = werewolfState;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_SHAPESHIFT with isWerewolf of %s", isWerewolf ? "true" : "false");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_SHAPESHIFT with isWerewolf of %s", isWerewolf ? "true" : "false");
|
||||
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_SHAPESHIFT)->setPlayer(this);
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_SHAPESHIFT)->Send();
|
||||
|
@ -1692,7 +1692,7 @@ void LocalPlayer::sendItemUse(const MWWorld::Ptr& itemPtr, bool itemMagicState,
|
|||
|
||||
void LocalPlayer::sendCellStates()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_CELL_STATE to server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_CELL_STATE to server");
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_CELL_STATE)->setPlayer(this);
|
||||
getNetworking()->getPlayerPacket(ID_PLAYER_CELL_STATE)->Send();
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
|
||||
#include <components/esm/esmwriter.hpp>
|
||||
|
@ -85,7 +85,7 @@ std::string loadSettings(Settings::Manager& settings)
|
|||
|
||||
Main::Main()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "tes3mp started");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "tes3mp started");
|
||||
mNetworking = new Networking();
|
||||
mLocalPlayer = new LocalPlayer();
|
||||
mGUIController = new GUIController();
|
||||
|
@ -97,7 +97,7 @@ Main::Main()
|
|||
|
||||
Main::~Main()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "tes3mp stopped");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "tes3mp stopped");
|
||||
delete mNetworking;
|
||||
delete mLocalPlayer;
|
||||
delete mCellController;
|
||||
|
@ -153,7 +153,7 @@ bool Main::init(std::vector<std::string> &content, Files::Collections &collectio
|
|||
initializeManager(manager);
|
||||
|
||||
int logLevel = manager.getInt("logLevel", "General");
|
||||
Log::SetLevel(logLevel);
|
||||
TimedLog::SetLevel(logLevel);
|
||||
if (address.empty())
|
||||
{
|
||||
pMain->server = manager.getString("destinationAddress", "General");
|
||||
|
@ -219,7 +219,7 @@ void Main::updateWorld(float dt) const
|
|||
if (init)
|
||||
{
|
||||
init = false;
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_BASEINFO to server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_BASEINFO to server");
|
||||
|
||||
mNetworking->getPlayerPacket(ID_PLAYER_BASEINFO)->setPlayer(getLocalPlayer());
|
||||
mNetworking->getPlayerPacket(ID_LOADED)->setPlayer(getLocalPlayer());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include <components/misc/rng.hpp>
|
||||
|
||||
|
@ -240,18 +240,18 @@ bool MechanicsHelper::getSpellSuccess(std::string spellId, const MWWorld::Ptr& c
|
|||
|
||||
void MechanicsHelper::processAttack(Attack attack, const MWWorld::Ptr& attacker)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Processing attack from %s of type %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Processing attack from %s of type %i",
|
||||
attacker.getClass().getName(attacker).c_str(), attack.type);
|
||||
|
||||
if (!attack.pressed)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- success: %s", attack.success ? "true" : "false");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- success: %s", attack.success ? "true" : "false");
|
||||
|
||||
if (attack.success)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- damage: %f", attack.damage);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- damage: %f", attack.damage);
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- pressed: %s", attack.pressed ? "true" : "false");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- pressed: %s", attack.pressed ? "true" : "false");
|
||||
|
||||
MWMechanics::CreatureStats &attackerStats = attacker.getClass().getCreatureStats(attacker);
|
||||
MWWorld::Ptr victim;
|
||||
|
@ -334,7 +334,7 @@ void MechanicsHelper::processAttack(Attack attack, const MWWorld::Ptr& attacker)
|
|||
|
||||
if (!weaponPtr.isEmpty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- weapon: %s\n- isRanged: %s\n- applyWeaponEnchantment: %s\n- applyAmmoEnchantment: %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- weapon: %s\n- isRanged: %s\n- applyWeaponEnchantment: %s\n- applyAmmoEnchantment: %s",
|
||||
weaponPtr.getCellRef().getRefId().c_str(), isRanged ? "true" : "false", attack.applyWeaponEnchantment ? "true" : "false",
|
||||
attack.applyAmmoEnchantment ? "true" : "false");
|
||||
|
||||
|
@ -395,7 +395,7 @@ void MechanicsHelper::processAttack(Attack attack, const MWWorld::Ptr& attacker)
|
|||
attack.instant = false;
|
||||
}
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- spellId: %s", attack.spellId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- spellId: %s", attack.spellId.c_str());
|
||||
}
|
||||
else if (attack.type == attack.ITEM_MAGIC)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ void MechanicsHelper::processAttack(Attack attack, const MWWorld::Ptr& attacker)
|
|||
it = attacker.getClass().getContainerStore(attacker).add(attack.itemId, 1, attacker);
|
||||
|
||||
inventoryStore.setSelectedEnchantItem(it);
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- itemId: %s", attack.itemId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- itemId: %s", attack.itemId.c_str());
|
||||
MWBase::Environment::get().getWorld()->castSpell(attacker);
|
||||
inventoryStore.setSelectedEnchantItem(inventoryStore.end());
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/Utils.hpp>
|
||||
#include <components/openmw-mp/Version.hpp>
|
||||
#include <components/openmw-mp/Packets/PacketPreInit.hpp>
|
||||
|
@ -228,19 +228,19 @@ void Networking::update()
|
|||
switch (packet->data[0])
|
||||
{
|
||||
case ID_REMOTE_DISCONNECTION_NOTIFICATION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Another client has disconnected.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Another client has disconnected.");
|
||||
break;
|
||||
case ID_REMOTE_CONNECTION_LOST:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Another client has lost connection.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Another client has lost connection.");
|
||||
break;
|
||||
case ID_REMOTE_NEW_INCOMING_CONNECTION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Another client has connected.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Another client has connected.");
|
||||
break;
|
||||
case ID_CONNECTION_REQUEST_ACCEPTED:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Our connection request has been accepted.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Our connection request has been accepted.");
|
||||
break;
|
||||
case ID_NEW_INCOMING_CONNECTION:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "A connection is incoming.");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "A connection is incoming.");
|
||||
break;
|
||||
case ID_NO_FREE_INCOMING_CONNECTIONS:
|
||||
errmsg = "The server is full.";
|
||||
|
@ -253,14 +253,14 @@ void Networking::update()
|
|||
break;
|
||||
default:
|
||||
receiveMessage(packet);
|
||||
//LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Message with identifier %i has arrived.", packet->data[0]);
|
||||
//LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Message with identifier %i has arrived.", packet->data[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!errmsg.empty())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, errmsg.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, errmsg.c_str());
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "tes3mp", errmsg.c_str(), 0);
|
||||
MWBase::Environment::get().getStateManager()->requestQuit();
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ void Networking::connect(const std::string &ip, unsigned short port, std::vector
|
|||
connected = true;
|
||||
queue = false;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONNECTION_REQUESTED_ACCEPTED from %s",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Received ID_CONNECTION_REQUESTED_ACCEPTED from %s",
|
||||
serverAddr.ToString());
|
||||
|
||||
break;
|
||||
|
@ -330,7 +330,7 @@ void Networking::connect(const std::string &ip, unsigned short port, std::vector
|
|||
case ID_CONNECTION_LOST:
|
||||
throw runtime_error("ID_CONNECTION_LOST.\n");
|
||||
default:
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Connection message with identifier %i has arrived in initialization.",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Connection message with identifier %i has arrived in initialization.",
|
||||
packet->data[0]);
|
||||
}
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ void Networking::connect(const std::string &ip, unsigned short port, std::vector
|
|||
|
||||
if (!errmsg.empty())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, errmsg.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, errmsg.c_str());
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "tes3mp", errmsg.c_str(), 0);
|
||||
}
|
||||
else
|
||||
|
@ -362,7 +362,7 @@ void Networking::preInit(std::vector<std::string> &content, Files::Collections &
|
|||
hashList.push_back(crc32);
|
||||
checksums.push_back(make_pair(*it, hashList));
|
||||
|
||||
LOG_APPEND(Log::LOG_WARN, "idx: %d\tchecksum: %X\tfile: %s\n", idx, crc32, col.getPath(*it).string().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_WARN, "idx: %d\tchecksum: %X\tfile: %s\n", idx, crc32, col.getPath(*it).string().c_str());
|
||||
}
|
||||
else
|
||||
throw std::runtime_error("Plugin doesn't exist.");
|
||||
|
@ -411,8 +411,8 @@ void Networking::preInit(std::vector<std::string> &content, Files::Collections &
|
|||
{
|
||||
std::string errmsg = listDiscrepancies(checksums, checksumsResponse);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, listDiscrepancies(checksums, checksumsResponse).c_str());
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, listComparison(checksums, checksumsResponse, true).c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, listDiscrepancies(checksums, checksumsResponse).c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, listComparison(checksums, checksumsResponse, true).c_str());
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "tes3mp", errmsg.c_str(), 0);
|
||||
connected = false;
|
||||
}
|
||||
|
@ -426,22 +426,22 @@ void Networking::receiveMessage(RakNet::Packet *packet)
|
|||
if (playerPacketController.ContainsPacket(packet->data[0]))
|
||||
{
|
||||
if (!PlayerProcessor::Process(*packet))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
|
||||
}
|
||||
else if (actorPacketController.ContainsPacket(packet->data[0]))
|
||||
{
|
||||
if (!ActorProcessor::Process(*packet, actorList))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", packet->data[0]);
|
||||
}
|
||||
else if (objectPacketController.ContainsPacket(packet->data[0]))
|
||||
{
|
||||
if (!ObjectProcessor::Process(*packet, objectList))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ObjectPacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled ObjectPacket with identifier %i has arrived", packet->data[0]);
|
||||
}
|
||||
else if (worldstatePacketController.ContainsPacket(packet->data[0]))
|
||||
{
|
||||
if (!WorldstateProcessor::Process(*packet, worldstate))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldstatePacket with identifier %i has arrived", packet->data[0]);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_WARN, "Unhandled WorldstatePacket with identifier %i has arrived", packet->data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "CellController.hpp"
|
||||
#include "RecordHelper.hpp"
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -84,14 +84,14 @@ void ObjectList::addContainerItem(mwmp::BaseObject& baseObject, const MWWorld::P
|
|||
containerItem.soul = itemPtr.getCellRef().getSoul();
|
||||
containerItem.actionCount = actionCount;
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "--- Adding container item %s", containerItem.refId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "--- Adding container item %s", containerItem.refId.c_str());
|
||||
|
||||
baseObject.containerItems.push_back(containerItem);
|
||||
}
|
||||
|
||||
void ObjectList::addEntireContainer(const MWWorld::Ptr& ptr)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Adding entire container %s %i-%i", ptr.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Adding entire container %s %i-%i", ptr.getCellRef().getRefId().c_str(),
|
||||
ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum());
|
||||
|
||||
MWWorld::ContainerStore& containerStore = ptr.getClass().getContainerStore(ptr);
|
||||
|
@ -110,7 +110,7 @@ void ObjectList::editContainers(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
bool isLocalEvent = guid == Main::get().getLocalPlayer()->guid;
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- isLocalEvent? %s", isLocalEvent ? "true" : "false");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- isLocalEvent? %s", isLocalEvent ? "true" : "false");
|
||||
|
||||
BaseObject baseObject;
|
||||
|
||||
|
@ -118,13 +118,13 @@ void ObjectList::editContainers(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
baseObject = baseObjects.at(i);
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- container cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- container cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
bool isCurrentContainer = false;
|
||||
|
@ -157,7 +157,7 @@ void ObjectList::editContainers(MWWorld::CellStore* cellStore)
|
|||
|
||||
for (const auto &containerItem : baseObject.containerItems)
|
||||
{
|
||||
//LOG_APPEND(Log::LOG_VERBOSE, "-- containerItem cellRef: %s, count: %i, actionCount: %i",
|
||||
//LOG_APPEND(TimedLog::LOG_VERBOSE, "-- containerItem cellRef: %s, count: %i, actionCount: %i",
|
||||
// containerItem.refId.c_str(), containerItem.count, containerItem.actionCount);
|
||||
|
||||
if (containerItem.refId.find("$dynamic") != string::npos)
|
||||
|
@ -281,7 +281,7 @@ void ObjectList::activateObjects(MWWorld::CellStore* cellStore)
|
|||
if (baseObject.guid == Main::get().getLocalPlayer()->guid)
|
||||
{
|
||||
ptrFound = Main::get().getLocalPlayer()->getPlayerPtr();
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Activated object is local player");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Activated object is local player");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -290,17 +290,17 @@ void ObjectList::activateObjects(MWWorld::CellStore* cellStore)
|
|||
if (player != 0)
|
||||
{
|
||||
ptrFound = player->getPtr();
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Activated object is player %s", player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Activated object is player %s", player->npc.mName.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Could not find player to activatee!");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Could not find player to activatee!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Activated object is %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Activated object is %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
}
|
||||
|
||||
|
@ -311,13 +311,13 @@ void ObjectList::activateObjects(MWWorld::CellStore* cellStore)
|
|||
if (baseObject.activatingActor.isPlayer)
|
||||
{
|
||||
activatingActorPtr = MechanicsHelper::getPlayerPtr(baseObject.activatingActor);
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Object has been activated by player %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Object has been activated by player %s",
|
||||
activatingActorPtr.getClass().getName(activatingActorPtr).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
activatingActorPtr = cellStore->searchExact(baseObject.activatingActor.refNum, baseObject.activatingActor.mpNum);
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Object has been activated by actor %s %i-%i", activatingActorPtr.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Object has been activated by actor %s %i-%i", activatingActorPtr.getCellRef().getRefId().c_str(),
|
||||
activatingActorPtr.getCellRef().getRefNum().mIndex, activatingActorPtr.getCellRef().getMpNum());
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ void ObjectList::placeObjects(MWWorld::CellStore* cellStore)
|
|||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i, count: %i, charge: %i, enchantmentCharge: %.2f, soul: %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i, count: %i, charge: %i, enchantmentCharge: %.2f, soul: %s",
|
||||
baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum, baseObject.count, baseObject.charge,
|
||||
baseObject.enchantmentCharge, baseObject.soul.c_str());
|
||||
|
||||
|
@ -388,11 +388,11 @@ void ObjectList::placeObjects(MWWorld::CellStore* cellStore)
|
|||
}
|
||||
catch (std::exception&)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Ignored placement of invalid object %s", baseObject.refId.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Ignored placement of invalid object %s", baseObject.refId.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Object already existed!");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Object already existed!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ void ObjectList::spawnObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(),
|
||||
baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
// Ignore generic dynamic refIds because they could be anything on other clients
|
||||
|
@ -408,7 +408,7 @@ void ObjectList::spawnObjects(MWWorld::CellStore* cellStore)
|
|||
continue;
|
||||
else if (!RecordHelper::doesCreatureRecordExist(baseObject.refId) && !RecordHelper::doesNpcRecordExist(baseObject.refId))
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Ignored spawning of invalid object %s", baseObject.refId.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Ignored spawning of invalid object %s", baseObject.refId.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ void ObjectList::spawnObjects(MWWorld::CellStore* cellStore)
|
|||
|
||||
if (masterPtr)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Actor has master: %s", masterPtr.getCellRef().getRefId().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Actor has master: %s", masterPtr.getCellRef().getRefId().c_str());
|
||||
|
||||
MWMechanics::AiFollow package(masterPtr);
|
||||
creatureStats.getAiSequence().stack(package, newPtr);
|
||||
|
@ -458,7 +458,7 @@ void ObjectList::spawnObjects(MWWorld::CellStore* cellStore)
|
|||
}
|
||||
}
|
||||
else
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Actor already existed!");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Actor already existed!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,13 +466,13 @@ void ObjectList::deleteObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
// If we are in a container, and it happens to be this object, exit it
|
||||
|
@ -497,13 +497,13 @@ void ObjectList::lockObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
if (baseObject.lockLevel > 0)
|
||||
|
@ -518,13 +518,13 @@ void ObjectList::triggerTrapObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
if (!baseObject.isDisarmed)
|
||||
|
@ -543,14 +543,14 @@ void ObjectList::scaleObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i, scale: %f", baseObject.refId.c_str(), baseObject.refNum,
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i, scale: %f", baseObject.refId.c_str(), baseObject.refNum,
|
||||
baseObject.mpNum, baseObject.scale);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
MWBase::Environment::get().getWorld()->scaleObject(ptrFound, baseObject.scale);
|
||||
|
@ -562,14 +562,14 @@ void ObjectList::setObjectStates(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i, state: %s", baseObject.refId.c_str(), baseObject.refNum,
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i, state: %s", baseObject.refId.c_str(), baseObject.refNum,
|
||||
baseObject.mpNum, baseObject.objectState ? "true" : "false");
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
if (baseObject.objectState)
|
||||
|
@ -584,13 +584,13 @@ void ObjectList::moveObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptrFound, baseObject.position.pos[0], baseObject.position.pos[1],
|
||||
|
@ -603,13 +603,13 @@ void ObjectList::rotateObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
MWBase::Environment::get().getWorld()->rotateObject(ptrFound,
|
||||
|
@ -622,13 +622,13 @@ void ObjectList::animateObjects(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
MWBase::MechanicsManager * mechanicsManager = MWBase::Environment::get().getMechanicsManager();
|
||||
|
@ -642,13 +642,13 @@ void ObjectList::activateDoors(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
ptrFound.getClass().setDoorState(ptrFound, baseObject.doorState);
|
||||
|
@ -661,13 +661,13 @@ void ObjectList::setDoorDestinations(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
ptrFound.getCellRef().setTeleport(baseObject.teleportState);
|
||||
|
@ -689,13 +689,13 @@ void ObjectList::runConsoleCommands(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Console command: %s", consoleCommand.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Console command: %s", consoleCommand.c_str());
|
||||
|
||||
if (baseObjects.empty())
|
||||
{
|
||||
windowManager->clearConsolePtr();
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Running with no object reference");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Running with no object reference");
|
||||
windowManager->executeCommandInConsole(consoleCommand);
|
||||
}
|
||||
else
|
||||
|
@ -708,7 +708,7 @@ void ObjectList::runConsoleCommands(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
if (baseObject.guid == Main::get().getLocalPlayer()->guid)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Running on local player");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Running on local player");
|
||||
windowManager->setConsolePtr(Main::get().getLocalPlayer()->getPlayerPtr());
|
||||
windowManager->executeCommandInConsole(consoleCommand);
|
||||
}
|
||||
|
@ -718,7 +718,7 @@ void ObjectList::runConsoleCommands(MWWorld::CellStore* cellStore)
|
|||
|
||||
if (player != 0)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Running on player %s", player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Running on player %s", player->npc.mName.c_str());
|
||||
windowManager->setConsolePtr(player->getPtr());
|
||||
windowManager->executeCommandInConsole(consoleCommand);
|
||||
}
|
||||
|
@ -726,13 +726,13 @@ void ObjectList::runConsoleCommands(MWWorld::CellStore* cellStore)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Running on object %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Running on object %s %i-%i", baseObject.refId.c_str(), baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
windowManager->setConsolePtr(ptrFound);
|
||||
|
@ -749,14 +749,14 @@ void ObjectList::setLocalShorts(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
baseObject.refNum, baseObject.mpNum, baseObject.index, baseObject.shortVal);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
ptrFound.getRefData().getLocals().mShorts.at(baseObject.index) = baseObject.shortVal;
|
||||
|
@ -768,14 +768,14 @@ void ObjectList::setLocalFloats(MWWorld::CellStore* cellStore)
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i, index: %i, floatVal: %f", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i, index: %i, floatVal: %f", baseObject.refId.c_str(),
|
||||
baseObject.refNum, baseObject.mpNum, baseObject.index, baseObject.floatVal);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
if (ptrFound)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
ptrFound.getRefData().getLocals().mFloats.at(baseObject.index) = baseObject.floatVal;
|
||||
|
@ -787,7 +787,7 @@ void ObjectList::setMemberShorts()
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
baseObject.index, baseObject.shortVal);
|
||||
|
||||
// Mimic the way a Ptr is fetched in InterpreterContext for similar situations
|
||||
|
@ -795,7 +795,7 @@ void ObjectList::setMemberShorts()
|
|||
|
||||
if (!ptrFound.isEmpty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Found %s %i-%i", ptrFound.getCellRef().getRefId().c_str(),
|
||||
ptrFound.getCellRef().getRefNum(), ptrFound.getCellRef().getMpNum());
|
||||
|
||||
std::string scriptId = ptrFound.getClass().getScript(ptrFound);
|
||||
|
@ -812,7 +812,7 @@ void ObjectList::setGlobalShorts()
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- varName: %s, shortVal: %i", baseObject.varName.c_str(), baseObject.shortVal);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- varName: %s, shortVal: %i", baseObject.varName.c_str(), baseObject.shortVal);
|
||||
|
||||
MWBase::Environment::get().getWorld()->setGlobalInt(baseObject.varName, baseObject.shortVal);
|
||||
}
|
||||
|
@ -822,7 +822,7 @@ void ObjectList::playMusic()
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- filename: %s", baseObject.musicFilename.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- filename: %s", baseObject.musicFilename.c_str());
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->streamMusic(baseObject.musicFilename);
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ void ObjectList::playVideo()
|
|||
{
|
||||
for (const auto &baseObject : baseObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- filename: %s, allowSkipping: %s", baseObject.videoFilename.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- filename: %s, allowSkipping: %s", baseObject.videoFilename.c_str(),
|
||||
baseObject.allowSkipping ? "true" : "false");
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->playVideo(baseObject.videoFilename, baseObject.allowSkipping);
|
||||
|
@ -864,7 +864,7 @@ void ObjectList::addRequestedContainers(MWWorld::CellStore* cellStore, const std
|
|||
{
|
||||
for (const auto &baseObject : requestObjects)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s %i-%i", baseObject.refId.c_str(),
|
||||
baseObject.refNum, baseObject.mpNum);
|
||||
|
||||
MWWorld::Ptr ptrFound = cellStore->searchExact(baseObject.refNum, baseObject.mpNum);
|
||||
|
@ -874,7 +874,7 @@ void ObjectList::addRequestedContainers(MWWorld::CellStore* cellStore, const std
|
|||
if (ptrFound.getClass().hasContainerStore(ptrFound))
|
||||
addEntireContainer(ptrFound);
|
||||
else
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "-- Object lacks container store", ptrFound.getCellRef().getRefId().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "-- Object lacks container store", ptrFound.getCellRef().getRefId().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1140,10 +1140,10 @@ void ObjectList::sendObjectPlace()
|
|||
if (baseObjects.size() == 0)
|
||||
return;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_OBJECT_PLACE about %s", cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_OBJECT_PLACE about %s", cell.getDescription().c_str());
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s, count: %i", baseObject.refId.c_str(), baseObject.count);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s, count: %i", baseObject.refId.c_str(), baseObject.count);
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_PLACE)->setObjectList(this);
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_PLACE)->Send();
|
||||
|
@ -1154,10 +1154,10 @@ void ObjectList::sendObjectSpawn()
|
|||
if (baseObjects.size() == 0)
|
||||
return;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_OBJECT_SPAWN about %s", cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_OBJECT_SPAWN about %s", cell.getDescription().c_str());
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i", baseObject.refId.c_str(), baseObject.refNum);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s-%i", baseObject.refId.c_str(), baseObject.refNum);
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_SPAWN)->setObjectList(this);
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_SPAWN)->Send();
|
||||
|
@ -1201,10 +1201,10 @@ void ObjectList::sendObjectAnimPlay()
|
|||
|
||||
void ObjectList::sendDoorState()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_DOOR_STATE about %s", cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_DOOR_STATE about %s", cell.getDescription().c_str());
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i, state: %s", baseObject.refId.c_str(), baseObject.refNum,
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s-%i, state: %s", baseObject.refId.c_str(), baseObject.refNum,
|
||||
baseObject.doorState ? "true" : "false");
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_DOOR_STATE)->setObjectList(this);
|
||||
|
@ -1225,10 +1225,10 @@ void ObjectList::sendVideoPlay()
|
|||
|
||||
void ObjectList::sendScriptLocalShort()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_LOCAL_SHORT about %s", cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_SCRIPT_LOCAL_SHORT about %s", cell.getDescription().c_str());
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s-%i, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
baseObject.refNum, baseObject.index, baseObject.shortVal);
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_LOCAL_SHORT)->setObjectList(this);
|
||||
|
@ -1237,10 +1237,10 @@ void ObjectList::sendScriptLocalShort()
|
|||
|
||||
void ObjectList::sendScriptLocalFloat()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_LOCAL_FLOAT about %s", cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_SCRIPT_LOCAL_FLOAT about %s", cell.getDescription().c_str());
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i, index: %i, floatVal: %f", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s-%i, index: %i, floatVal: %f", baseObject.refId.c_str(),
|
||||
baseObject.refNum, baseObject.index, baseObject.floatVal);
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_LOCAL_FLOAT)->setObjectList(this);
|
||||
|
@ -1249,10 +1249,10 @@ void ObjectList::sendScriptLocalFloat()
|
|||
|
||||
void ObjectList::sendScriptMemberShort()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_MEMBER_SHORT");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_SCRIPT_MEMBER_SHORT");
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- cellRef: %s, index: %i, shortVal: %i", baseObject.refId.c_str(),
|
||||
baseObject.index, baseObject.shortVal);
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_MEMBER_SHORT)->setObjectList(this);
|
||||
|
@ -1261,10 +1261,10 @@ void ObjectList::sendScriptMemberShort()
|
|||
|
||||
void ObjectList::sendScriptGlobalShort()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_SCRIPT_GLOBAL_SHORT");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_SCRIPT_GLOBAL_SHORT");
|
||||
|
||||
for (const auto &baseObject : baseObjects)
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- varName: %s, shortVal: %i", baseObject.varName.c_str(), baseObject.shortVal);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- varName: %s, shortVal: %i", baseObject.varName.c_str(), baseObject.shortVal);
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_GLOBAL_SHORT)->setObjectList(this);
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_GLOBAL_SHORT)->Send();
|
||||
|
@ -1272,7 +1272,7 @@ void ObjectList::sendScriptGlobalShort()
|
|||
|
||||
void ObjectList::sendContainer()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_CONTAINER");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Sending ID_CONTAINER");
|
||||
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->setObjectList(this);
|
||||
mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->Send();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <apps/openmw/mwclass/creature.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
@ -36,11 +36,11 @@ void PlayerList::update(float dt)
|
|||
|
||||
DedicatedPlayer *PlayerList::newPlayer(RakNet::RakNetGUID guid)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Creating new DedicatedPlayer with guid %s", guid.ToString());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Creating new DedicatedPlayer with guid %s", guid.ToString());
|
||||
|
||||
players[guid] = new DedicatedPlayer(guid);
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- There are now %i DedicatedPlayers", players.size());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- There are now %i DedicatedPlayers", players.size());
|
||||
|
||||
return players[guid];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
|
@ -180,7 +180,7 @@ void RecordHelper::overrideCreatureRecord(const mwmp::CreatureRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ void RecordHelper::overrideCreatureRecord(const mwmp::CreatureRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void RecordHelper::overrideNpcRecord(const mwmp::NpcRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -270,12 +270,12 @@ void RecordHelper::overrideNpcRecord(const mwmp::NpcRecord& record)
|
|||
{
|
||||
if (!doesRaceRecordExist(recordData.mRace))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new NPC record with invalid race provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new NPC record with invalid race provided");
|
||||
return;
|
||||
}
|
||||
else if (!doesClassRecordExist(recordData.mClass))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new NPC record with invalid class provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new NPC record with invalid class provided");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -367,7 +367,7 @@ void RecordHelper::overrideNpcRecord(const mwmp::NpcRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -391,7 +391,7 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco
|
|||
{
|
||||
if (recordData.mEffects.mList.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new enchantment record with no effects");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new enchantment record with no effects");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -422,7 +422,7 @@ void RecordHelper::overrideEnchantmentRecord(const mwmp::EnchantmentRecord& reco
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ void RecordHelper::overridePotionRecord(const mwmp::PotionRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -478,7 +478,7 @@ void RecordHelper::overridePotionRecord(const mwmp::PotionRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ void RecordHelper::overrideSpellRecord(const mwmp::SpellRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -528,7 +528,7 @@ void RecordHelper::overrideSpellRecord(const mwmp::SpellRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -550,7 +550,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record)
|
|||
{
|
||||
if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new armor record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new armor record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -593,7 +593,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record)
|
|||
if (recordData.mEnchant.empty() || doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
finalData.mEnchant = recordData.mEnchant;
|
||||
else
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
}
|
||||
|
||||
if (record.baseOverrides.hasEnchantmentCharge)
|
||||
|
@ -609,7 +609,7 @@ void RecordHelper::overrideArmorRecord(const mwmp::ArmorRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -634,7 +634,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record)
|
|||
{
|
||||
if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new book record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new book record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -675,7 +675,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record)
|
|||
if (recordData.mEnchant.empty() || doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
finalData.mEnchant = recordData.mEnchant;
|
||||
else
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
}
|
||||
|
||||
if (record.baseOverrides.hasEnchantmentCharge)
|
||||
|
@ -688,7 +688,7 @@ void RecordHelper::overrideBookRecord(const mwmp::BookRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -702,7 +702,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -713,7 +713,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record)
|
|||
{
|
||||
if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new clothing record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new clothing record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -748,7 +748,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record)
|
|||
if (recordData.mEnchant.empty() || doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
finalData.mEnchant = recordData.mEnchant;
|
||||
else
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
}
|
||||
|
||||
if (record.baseOverrides.hasEnchantmentCharge)
|
||||
|
@ -764,7 +764,7 @@ void RecordHelper::overrideClothingRecord(const mwmp::ClothingRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -778,7 +778,7 @@ void RecordHelper::overrideMiscellaneousRecord(const mwmp::MiscellaneousRecord&
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -820,7 +820,7 @@ void RecordHelper::overrideMiscellaneousRecord(const mwmp::MiscellaneousRecord&
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -834,7 +834,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -845,7 +845,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record)
|
|||
{
|
||||
if (!recordData.mEnchant.empty() && !doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring new weapon record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring new weapon record with invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -910,7 +910,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record)
|
|||
if (recordData.mEnchant.empty() || doesEnchantmentRecordExist(recordData.mEnchant))
|
||||
finalData.mEnchant = recordData.mEnchant;
|
||||
else
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring invalid enchantmentId %s", recordData.mEnchant.c_str());
|
||||
}
|
||||
|
||||
if (record.baseOverrides.hasEnchantmentCharge)
|
||||
|
@ -923,7 +923,7 @@ void RecordHelper::overrideWeaponRecord(const mwmp::WeaponRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -937,7 +937,7 @@ void RecordHelper::overrideContainerRecord(const mwmp::ContainerRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -976,7 +976,7 @@ void RecordHelper::overrideContainerRecord(const mwmp::ContainerRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -990,7 +990,7 @@ void RecordHelper::overrideDoorRecord(const mwmp::DoorRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ void RecordHelper::overrideDoorRecord(const mwmp::DoorRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ void RecordHelper::overrideActivatorRecord(const mwmp::ActivatorRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ void RecordHelper::overrideActivatorRecord(const mwmp::ActivatorRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ void RecordHelper::overrideStaticRecord(const mwmp::StaticRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ void RecordHelper::overrideStaticRecord(const mwmp::StaticRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ void RecordHelper::overrideIngredientRecord(const mwmp::IngredientRecord& record
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1173,7 +1173,7 @@ void RecordHelper::overrideIngredientRecord(const mwmp::IngredientRecord& record
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ void RecordHelper::overrideApparatusRecord(const mwmp::ApparatusRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ void RecordHelper::overrideApparatusRecord(const mwmp::ApparatusRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1246,7 +1246,7 @@ void RecordHelper::overrideLockpickRecord(const mwmp::LockpickRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ void RecordHelper::overrideLockpickRecord(const mwmp::LockpickRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1305,7 +1305,7 @@ void RecordHelper::overrideProbeRecord(const mwmp::ProbeRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1350,7 +1350,7 @@ void RecordHelper::overrideProbeRecord(const mwmp::ProbeRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1364,7 +1364,7 @@ void RecordHelper::overrideRepairRecord(const mwmp::RepairRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1409,7 +1409,7 @@ void RecordHelper::overrideRepairRecord(const mwmp::RepairRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1423,7 +1423,7 @@ void RecordHelper::overrideLightRecord(const mwmp::LightRecord& record)
|
|||
|
||||
if (recordData.mId.empty())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with no id provided");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1477,7 +1477,7 @@ void RecordHelper::overrideLightRecord(const mwmp::LightRecord& record)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "-- Ignoring record override with invalid baseId %s", record.baseId.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
|
@ -35,7 +35,7 @@ Networking *Worldstate::getNetworking()
|
|||
|
||||
void Worldstate::addRecords()
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_RECORD_DYNAMIC with %i records of type %i",
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_RECORD_DYNAMIC with %i records of type %i",
|
||||
recordsCount, recordsType);
|
||||
|
||||
if (recordsType == mwmp::RECORD_TYPE::SPELL)
|
||||
|
@ -44,7 +44,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- spell record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- spell record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideSpellRecord(record);
|
||||
|
@ -56,7 +56,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- potion record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- potion record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overridePotionRecord(record);
|
||||
|
@ -68,7 +68,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- enchantment record %s, %i\n-- baseId is %s", record.data.mId.c_str(), record.data.mData.mType,
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- enchantment record %s, %i\n-- baseId is %s", record.data.mId.c_str(), record.data.mData.mType,
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideEnchantmentRecord(record);
|
||||
|
@ -80,7 +80,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- creature record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- creature record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideCreatureRecord(record);
|
||||
|
@ -92,7 +92,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- NPC record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- NPC record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideNpcRecord(record);
|
||||
|
@ -104,7 +104,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- armor record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- armor record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideArmorRecord(record);
|
||||
|
@ -116,7 +116,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- book record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- book record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideBookRecord(record);
|
||||
|
@ -128,7 +128,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- clothing record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- clothing record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideClothingRecord(record);
|
||||
|
@ -140,7 +140,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- miscellaneous record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- miscellaneous record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideMiscellaneousRecord(record);
|
||||
|
@ -152,7 +152,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- weapon record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- weapon record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideWeaponRecord(record);
|
||||
|
@ -164,7 +164,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- container record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- container record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideContainerRecord(record);
|
||||
|
@ -176,7 +176,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- door record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- door record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideDoorRecord(record);
|
||||
|
@ -188,7 +188,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- activator record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- activator record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideActivatorRecord(record);
|
||||
|
@ -200,7 +200,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- static record %s\n-- baseId is %s", record.data.mId.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- static record %s\n-- baseId is %s", record.data.mId.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideStaticRecord(record);
|
||||
|
@ -212,7 +212,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- ingredient record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- ingredient record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideIngredientRecord(record);
|
||||
|
@ -224,7 +224,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- apparatus record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- apparatus record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideApparatusRecord(record);
|
||||
|
@ -236,7 +236,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- lockpick record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- lockpick record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideLockpickRecord(record);
|
||||
|
@ -248,7 +248,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- probe record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- probe record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideProbeRecord(record);
|
||||
|
@ -260,7 +260,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- repair record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- repair record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideRepairRecord(record);
|
||||
|
@ -272,7 +272,7 @@ void Worldstate::addRecords()
|
|||
{
|
||||
bool hasBaseId = !record.baseId.empty();
|
||||
|
||||
LOG_APPEND(Log::LOG_INFO, "- light record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- light record %s, %s\n-- baseId is %s", record.data.mId.c_str(), record.data.mName.c_str(),
|
||||
hasBaseId ? record.baseId.c_str() : "empty");
|
||||
|
||||
RecordHelper::overrideLightRecord(record);
|
||||
|
@ -324,7 +324,7 @@ void Worldstate::setWeather()
|
|||
// doesn't have the correct new region set for us, so make sure we update it
|
||||
world->updateWeather(0);
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Setting weather for region: %s, currentWeather: %i, "
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Setting weather for region: %s, currentWeather: %i, "
|
||||
"nextWeather: %i, queuedWeather: %i, transitionFactor: %f, forceWeather is %s",
|
||||
weather.region.c_str(), weather.currentWeather, weather.nextWeather,
|
||||
weather.queuedWeather, weather.transitionFactor, forceWeather ? "true" : "false");
|
||||
|
@ -342,7 +342,7 @@ void Worldstate::sendMapExplored(int cellX, int cellY, const std::vector<char>&
|
|||
mapTile.y = cellY;
|
||||
mapTile.imageData = imageData;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_MAP with x: %i, y: %i", cellX, cellY);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_MAP with x: %i, y: %i", cellX, cellY);
|
||||
|
||||
mapTiles.push_back(mapTile);
|
||||
|
||||
|
@ -359,7 +359,7 @@ void Worldstate::sendWeather(std::string region, int currentWeather, int nextWea
|
|||
weather.queuedWeather = queuedWeather;
|
||||
weather.transitionFactor = transitionFactor;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_WEATHER with region: %s, currentWeather: %i, "
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_PLAYER_WEATHER with region: %s, currentWeather: %i, "
|
||||
"nextWeather: %i, queuedWeather, %i, transitionFactor: %f",
|
||||
region.c_str(), currentWeather, nextWeather, queuedWeather, transitionFactor);
|
||||
|
||||
|
@ -371,7 +371,7 @@ void Worldstate::sendEnchantmentRecord(const ESM::Enchantment* enchantment)
|
|||
{
|
||||
enchantmentRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with enchantment");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with enchantment");
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::ENCHANTMENT;
|
||||
|
||||
|
@ -387,7 +387,7 @@ void Worldstate::sendPotionRecord(const ESM::Potion* potion)
|
|||
{
|
||||
potionRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with potion %s", potion->mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with potion %s", potion->mName.c_str());
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::POTION;
|
||||
|
||||
|
@ -403,7 +403,7 @@ void Worldstate::sendSpellRecord(const ESM::Spell* spell)
|
|||
{
|
||||
spellRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with spell %s", spell->mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with spell %s", spell->mName.c_str());
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::SPELL;
|
||||
|
||||
|
@ -419,7 +419,7 @@ void Worldstate::sendArmorRecord(const ESM::Armor* armor, std::string baseId)
|
|||
{
|
||||
armorRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with armor %s", armor->mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with armor %s", armor->mName.c_str());
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::ARMOR;
|
||||
|
||||
|
@ -439,7 +439,7 @@ void Worldstate::sendBookRecord(const ESM::Book* book, std::string baseId)
|
|||
{
|
||||
bookRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with book %s", book->mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with book %s", book->mName.c_str());
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::BOOK;
|
||||
|
||||
|
@ -459,7 +459,7 @@ void Worldstate::sendClothingRecord(const ESM::Clothing* clothing, std::string b
|
|||
{
|
||||
clothingRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with clothing %s", clothing->mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with clothing %s", clothing->mName.c_str());
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::CLOTHING;
|
||||
|
||||
|
@ -479,7 +479,7 @@ void Worldstate::sendWeaponRecord(const ESM::Weapon* weapon, std::string baseId)
|
|||
{
|
||||
weaponRecords.clear();
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_RECORD_DYNAMIC with weapon %s", weapon->mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Sending ID_RECORD_DYNAMIC with weapon %s", weapon->mName.c_str());
|
||||
|
||||
recordsType = mwmp::RECORD_TYPE::WEAPON;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ bool ActorProcessor::Process(RakNet::Packet &packet, ActorList &actorList)
|
|||
if (actorList.isValid)
|
||||
processor.second->Do(*myPacket, actorList);
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef OPENMW_ACTORPROCESSOR_HPP
|
||||
#define OPENMW_ACTORPROCESSOR_HPP
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Packets/Actor/ActorPacket.hpp>
|
||||
#include "../ObjectList.hpp"
|
||||
|
|
|
@ -34,7 +34,7 @@ bool ObjectProcessor::Process(RakNet::Packet &packet, ObjectList &objectList)
|
|||
if (objectList.isValid)
|
||||
processor.second->Do(*myPacket, objectList);
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENMW_OBJECTPROCESSSOR_HPP
|
||||
#define OPENMW_OBJECTPROCESSSOR_HPP
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Packets/Object/ObjectPacket.hpp>
|
||||
#include "../ObjectList.hpp"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef OPENMW_PLAYERPROCESSOR_HPP
|
||||
#define OPENMW_PLAYERPROCESSOR_HPP
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
#include "../LocalPlayer.hpp"
|
||||
|
|
|
@ -34,7 +34,7 @@ bool WorldstateProcessor::Process(RakNet::Packet &packet, Worldstate &worldstate
|
|||
if (worldstate.isValid)
|
||||
processor.second->Do(*myPacket, worldstate);
|
||||
else
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_ERROR, "Received %s that failed integrity check and was ignored!", processor.second->strPacketID.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef OPENMW_WORLDSTATEPROCESSOR_HPP
|
||||
#define OPENMW_WORLDSTATEPROCESSOR_HPP
|
||||
|
||||
#include <components/openmw-mp/Log.hpp>
|
||||
#include <components/openmw-mp/TimedLog.hpp>
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
#include <components/openmw-mp/Packets/Worldstate/WorldstatePacket.hpp>
|
||||
#include "BaseClientPacketProcessor.hpp"
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ActorPacket &packet, ActorList &actorList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str());
|
||||
|
||||
Main::get().getCellController()->readAi(actorList);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ActorPacket &packet, ActorList &actorList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str());
|
||||
mwmp::CellController *cellController = Main::get().getCellController();
|
||||
|
||||
// Never initialize LocalActors in a cell that is no longer loaded, if the server's packet arrived too late
|
||||
|
@ -30,7 +30,7 @@ namespace mwmp
|
|||
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- The new authority is me");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- The new authority is me");
|
||||
cell->uninitializeDedicatedActors();
|
||||
cell->initializeLocalActors();
|
||||
cell->updateLocal(true);
|
||||
|
@ -40,14 +40,14 @@ namespace mwmp
|
|||
BasePlayer *player = PlayerList::getPlayer(guid);
|
||||
|
||||
if (player != 0)
|
||||
LOG_APPEND(Log::LOG_INFO, "- The new authority is %s", player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- The new authority is %s", player->npc.mName.c_str());
|
||||
|
||||
cell->uninitializeLocalActors();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Ignoring it because that cell isn't loaded");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Ignoring it because that cell isn't loaded");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -22,8 +22,8 @@ namespace mwmp
|
|||
|
||||
if (!ptrCellStore) return;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str());
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- action: %i", actorList.action);
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), actorList.cell.getDescription().c_str());
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- action: %i", actorList.action);
|
||||
|
||||
// If we've received a request for information, comply with it
|
||||
if (actorList.action == mwmp::BaseActorList::REQUEST)
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace mwmp
|
|||
|
||||
if (!ptrCellStore) return;
|
||||
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), objectList.cell.getDescription().c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s about %s", strPacketID.c_str(), objectList.cell.getDescription().c_str());
|
||||
}
|
||||
protected:
|
||||
MWWorld::CellStore *ptrCellStore;
|
||||
|
|
|
@ -17,14 +17,14 @@ namespace mwmp
|
|||
{
|
||||
BaseObjectProcessor::Do(packet, objectList);
|
||||
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- action: %i, containerSubAction: %i", objectList.action, objectList.containerSubAction);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- action: %i, containerSubAction: %i", objectList.action, objectList.containerSubAction);
|
||||
|
||||
// If we've received a request for information, comply with it
|
||||
if (objectList.action == mwmp::BaseObjectList::REQUEST)
|
||||
{
|
||||
if (objectList.baseObjectCount == 0)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Request had no objects attached, so we are sending all containers in the cell %s",
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Request had no objects attached, so we are sending all containers in the cell %s",
|
||||
objectList.cell.getDescription().c_str());
|
||||
objectList.reset();
|
||||
objectList.cell = *ptrCellStore->getCell();
|
||||
|
@ -35,7 +35,7 @@ namespace mwmp
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Request was for %i %s", objectList.baseObjectCount, objectList.baseObjectCount == 1 ? "object" : "objects");
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Request was for %i %s", objectList.baseObjectCount, objectList.baseObjectCount == 1 ? "object" : "objects");
|
||||
std::vector<BaseObject> requestObjects = objectList.baseObjects;
|
||||
objectList.reset();
|
||||
objectList.cell = *ptrCellStore->getCell();
|
||||
|
@ -50,7 +50,7 @@ namespace mwmp
|
|||
// Otherwise, edit containers based on the information received
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- Editing container contents to match those of packet", objectList.baseObjectCount);
|
||||
LOG_APPEND(TimedLog::LOG_VERBOSE, "- Editing container contents to match those of packet", objectList.baseObjectCount);
|
||||
objectList.editContainers(ptrCellStore);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
objectList.playMusic();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
//objectList.setGlobalFloats();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
objectList.setGlobalShorts();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
//objectList.setMemberFloats();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
objectList.setMemberShorts();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace mwmp
|
|||
|
||||
virtual void Do(ObjectPacket &packet, ObjectList &objectList)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_VERBOSE, "Received %s", strPacketID.c_str());
|
||||
objectList.playVideo();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace mwmp
|
|||
{
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "ID_GUI_MESSAGEBOX, Type %d, MSG %s", player->guiMessageBox.type,
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "ID_GUI_MESSAGEBOX, Type %d, MSG %s", player->guiMessageBox.type,
|
||||
player->guiMessageBox.label.c_str());
|
||||
|
||||
switch(player->guiMessageBox.type)
|
||||
|
|
|
@ -19,11 +19,11 @@ namespace mwmp
|
|||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
{
|
||||
static const int initialLogLevel = Log::GetLevel();
|
||||
static const int initialLogLevel = TimedLog::GetLevel();
|
||||
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_SETTINGS");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_GAME_SETTINGS");
|
||||
|
||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
{
|
||||
|
@ -36,13 +36,13 @@ namespace mwmp
|
|||
|
||||
if (player->enforcedLogLevel > -1)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- server is enforcing log level %i", player->enforcedLogLevel);
|
||||
Log::SetLevel(player->enforcedLogLevel);
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- server is enforcing log level %i", player->enforcedLogLevel);
|
||||
TimedLog::SetLevel(player->enforcedLogLevel);
|
||||
}
|
||||
else if (initialLogLevel != Log::GetLevel())
|
||||
else if (initialLogLevel != TimedLog::GetLevel())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- log level has been reset to initial value %i", initialLogLevel);
|
||||
Log::SetLevel(initialLogLevel);
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- log level has been reset to initial value %i", initialLogLevel);
|
||||
TimedLog::SetLevel(initialLogLevel);
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getWorld()->setPhysicsFramerate(player->physicsFramerate);
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace mwmp
|
|||
{
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_ANIM_PLAY about LocalPlayer from server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_ANIM_PLAY about LocalPlayer from server");
|
||||
static_cast<LocalPlayer*>(player)->playAnimation();
|
||||
}
|
||||
else if (player != 0)
|
||||
|
|
|
@ -19,30 +19,30 @@ namespace mwmp
|
|||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_BASEINFO from server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_BASEINFO from server");
|
||||
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Packet was about LocalPlayer");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Packet was about LocalPlayer");
|
||||
|
||||
if (isRequest())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Requesting info");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Requesting info");
|
||||
packet.Send(serverAddr);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Setting character for LocalPlayer");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Setting character for LocalPlayer");
|
||||
static_cast<LocalPlayer*>(player)->setCharacter();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Packet was about %s", player == 0 ? "new player" : player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Packet was about %s", player == 0 ? "new player" : player->npc.mName.c_str());
|
||||
|
||||
if (player == 0)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Exchanging data with new player");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Exchanging data with new player");
|
||||
player = PlayerList::newPlayer(guid);
|
||||
|
||||
packet.setPlayer(player);
|
||||
|
|
|
@ -21,10 +21,10 @@ namespace mwmp
|
|||
|
||||
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_DEATH from server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_DEATH from server");
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Packet was about me");
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Packet was about me");
|
||||
|
||||
player->creatureStats.mDead = true;
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace mwmp
|
|||
}
|
||||
else if (player != 0)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_INFO, "- Packet was about %s", player->npc.mName.c_str());
|
||||
LOG_APPEND(TimedLog::LOG_INFO, "- Packet was about %s", player->npc.mName.c_str());
|
||||
|
||||
MWMechanics::DynamicStat<float> health;
|
||||
player->creatureStats.mDead = true;
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace mwmp
|
|||
{
|
||||
if (isLocal())
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_EQUIPMENT about LocalPlayer from server");
|
||||
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_EQUIPMENT about LocalPlayer from server");
|
||||
|
||||
if (isRequest())
|
||||
static_cast<LocalPlayer*>(player)->updateEquipment(true);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue