Make logger automatically put a newline (#675)

at the end of the line
remove all the newlines in log calls
This commit is contained in:
Aaron Kimbrell
2022-07-24 21:26:51 -05:00
committed by GitHub
parent a7fb6eb3f3
commit e97ae92624
86 changed files with 1249 additions and 1252 deletions

View File

@@ -162,7 +162,7 @@ void DestroyableComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsIn
void DestroyableComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
tinyxml2::XMLElement* dest = doc->FirstChildElement("obj")->FirstChildElement("dest");
if (!dest) {
Game::logger->Log("DestroyableComponent", "Failed to find dest tag!\n");
Game::logger->Log("DestroyableComponent", "Failed to find dest tag!");
return;
}
@@ -184,7 +184,7 @@ void DestroyableComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
void DestroyableComponent::UpdateXml(tinyxml2::XMLDocument* doc) {
tinyxml2::XMLElement* dest = doc->FirstChildElement("obj")->FirstChildElement("dest");
if (!dest) {
Game::logger->Log("DestroyableComponent", "Failed to find dest tag!\n");
Game::logger->Log("DestroyableComponent", "Failed to find dest tag!");
return;
}
@@ -246,7 +246,7 @@ void DestroyableComponent::SetArmor(int32_t value) {
// If Destroyable Component already has zero armor do not trigger the passive ability again.
bool hadArmor = m_iArmor > 0;
auto* characterComponent = m_Parent->GetComponent<CharacterComponent>();
if (characterComponent != nullptr) {
characterComponent->TrackArmorDelta(value - m_iArmor);
@@ -499,7 +499,7 @@ bool DestroyableComponent::CheckValidity(const LWOOBJID target, const bool ignor
if (targetEntity == nullptr)
{
Game::logger->Log("DestroyableComponent", "Invalid entity for checking validity (%llu)!\n", target);
Game::logger->Log("DestroyableComponent", "Invalid entity for checking validity (%llu)!", target);
return false;
}
@@ -777,22 +777,22 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType
else
{
//Check if this zone allows coin drops
if (dZoneManager::Instance()->GetPlayerLoseCoinOnDeath())
if (dZoneManager::Instance()->GetPlayerLoseCoinOnDeath())
{
auto* character = m_Parent->GetCharacter();
uint64_t coinsTotal = character->GetCoins();
if (coinsTotal > 0)
if (coinsTotal > 0)
{
uint64_t coinsToLoose = 1;
if (coinsTotal >= 200)
if (coinsTotal >= 200)
{
float hundreth = (coinsTotal / 100.0f);
coinsToLoose = static_cast<int>(hundreth);
}
if (coinsToLoose > 10000)
if (coinsToLoose > 10000)
{
coinsToLoose = 10000;
}