log players on server
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include <server/handlers/PlayerLoginHandler.h>
|
||||
|
||||
#include <Nazara/Core/Time.hpp>
|
||||
#include <blitz/common/Format.h>
|
||||
#include <blitz/common/Log.h>
|
||||
#include <blitz/components/PlayerInfo.h>
|
||||
#include <server/components/EnetConnection.h>
|
||||
#include <server/components/KeepAliveSession.h>
|
||||
@@ -62,6 +64,8 @@ void PlayerLoginHandler::Handle(std::uint16_t a_PeerId, const protocol::data::Pl
|
||||
for (auto [entity, connection] : world->GetRegistry().view<EnetConnectionComponent>().each()) {
|
||||
connection.m_Connection->SendPlayerJoin({newPlayer});
|
||||
}
|
||||
|
||||
LogD(Format("[Server] %s joined !", a_PlayerLogin.m_PlayerName.c_str()));
|
||||
}
|
||||
|
||||
} // namespace server
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include <server/Server.h>
|
||||
|
||||
#include <blitz/common/Format.h>
|
||||
#include <blitz/common/Log.h>
|
||||
|
||||
namespace blitz {
|
||||
namespace server {
|
||||
|
||||
@@ -24,6 +27,7 @@ void DisconectSystem::Update(Nz::Time elapsedTime) {
|
||||
for (auto [entity, connection] : registry.view<EnetConnectionComponent>().each()) {
|
||||
connection.m_Connection->SendPlayerLeave({player->m_PlayerId});
|
||||
}
|
||||
LogD(Format("[Server] %s left !", player->m_Pseudo.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user