From 4727ed20846bb3d1a9eabb27aaaa9c5524129556 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 24 Sep 2018 21:33:39 +0100 Subject: Add a formatting function for Vector3 (#4282) * Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG --- src/Entities/Player.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Entities/Player.cpp') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index cd1414adb..044b802b7 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -150,8 +150,8 @@ cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) : SetWorld(World); // Use default world - LOGD("Player \"%s\" is connecting for the first time, spawning at default world spawn {%.2f, %.2f, %.2f}", - a_PlayerName.c_str(), GetPosX(), GetPosY(), GetPosZ() + FLOGD("Player \"{0}\" is connecting for the first time, spawning at default world spawn {1:.2f}", + a_PlayerName, GetPosition() ); } @@ -2256,8 +2256,8 @@ bool cPlayer::LoadFromFile(const AString & a_FileName, cWorldPtr & a_World) cStatSerializer StatSerializer(cRoot::Get()->GetDefaultWorld()->GetDataPath(), GetName(), GetUUID().ToLongString(), &m_Stats); StatSerializer.Load(); - LOGD("Player %s was read from file \"%s\", spawning at {%.2f, %.2f, %.2f} in world \"%s\"", - GetName().c_str(), a_FileName.c_str(), GetPosX(), GetPosY(), GetPosZ(), a_World->GetName().c_str() + FLOGD("Player {0} was read from file \"{1}\", spawning at {2:.2f} in world \"{3}\"", + GetName(), a_FileName, GetPosition(), a_World->GetName() ); return true; -- cgit v1.2.3