Add a per-instance local-player log prefix and apply it to networking and main plugin logs to make shared Fallout4Together.log entries readable when multiple instances run. Introduces F4T::Networking::GetLocalPlayerLogPrefix() (declared in F4TNetworking.h, implemented in F4TNetworking.cpp) and updates numerous REX::INFO/WARN calls to include the prefix. Also: only log sent player transforms after SendTransformPacket succeeds, add a small TODO comment about per-instance log files, and update docs (dev-log.md and plugin/setup.md) and the setup checklist to reflect the prefixed logging behavior. The prefix reads the assigned player ID via the thread-safe remote-player accessor and defaults to "[LocalPlayerId=unassigned]" before assignment.
23 lines
459 B
C++
23 lines
459 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace F4T::Networking
|
|
{
|
|
std::string GetLocalPlayerLogPrefix();
|
|
bool ConnectToLocalServer();
|
|
void DisconnectFromLocalServer();
|
|
bool IsConnectedToServer();
|
|
bool SendTransformPacket(
|
|
float a_x,
|
|
float a_y,
|
|
float a_z,
|
|
float a_angleZ,
|
|
const char* a_movementType,
|
|
bool a_hasCellId = false,
|
|
std::uint32_t a_cellId = 0,
|
|
bool a_hasWorldspaceId = false,
|
|
std::uint32_t a_worldspaceId = 0);
|
|
}
|