replaced a few more macro instances

This commit is contained in:
jadebenn 2024-03-13 20:47:41 -05:00
parent cfb0826d22
commit 4c4ea2ae71
7 changed files with 23 additions and 24 deletions

View File

@ -19,7 +19,7 @@ void PropertyVendorComponent::OnUse(Entity* originator) {
OnQueryPropertyData(originator, originator->GetSystemAddress());
if (PropertyManagementComponent::Instance()->GetOwnerId() == LWOOBJID_EMPTY) {
LOG("Property vendor opening!");
Log::Info("Property vendor opening!");
GameMessages::SendOpenPropertyVendor(m_Parent->GetObjectID(), originator->GetSystemAddress());
@ -37,7 +37,7 @@ void PropertyVendorComponent::OnBuyFromVendor(Entity* originator, const bool con
if (PropertyManagementComponent::Instance() == nullptr) return;
if (PropertyManagementComponent::Instance()->Claim(originator->GetObjectID()) == false) {
LOG("FAILED TO CLAIM PROPERTY. PLAYER ID IS %llu", originator->GetObjectID());
Log::Warn("FAILED TO CLAIM PROPERTY. PLAYER ID IS {}", originator->GetObjectID());
return;
}
@ -51,6 +51,5 @@ void PropertyVendorComponent::OnBuyFromVendor(Entity* originator, const bool con
PropertyManagementComponent::Instance()->OnQueryPropertyData(originator, originator->GetSystemAddress());
LOG("Fired event; (%d) (%i) (%i)", confirmed, lot, count);
Log::Info("Fired event; ({}) ({}) ({})", confirmed, lot, count);
}

View File

@ -37,7 +37,7 @@ QuickBuildComponent::QuickBuildComponent(Entity* const entity) : Component{ enti
if (positionAsVector.size() == 3 && activatorPositionValid) {
m_ActivatorPosition = activatorPositionValid.value();
} else {
LOG("Failed to find activator position for lot %i. Defaulting to parents position.", m_Parent->GetLOT());
Log::Info("Failed to find activator position for lot {}. Defaulting to parent's position.", m_Parent->GetLOT());
m_ActivatorPosition = m_Parent->GetPosition();
}
@ -432,7 +432,7 @@ void QuickBuildComponent::CompleteQuickBuild(Entity* const user) {
characterComponent->SetCurrentActivity(eGameActivity::NONE);
characterComponent->TrackQuickBuildComplete();
} else {
LOG("Some user tried to finish the rebuild but they didn't have a character somehow.");
Log::Warn("Some user tried to finish the rebuild but they didn't have a character somehow.");
return;
}

View File

@ -77,7 +77,7 @@ void RacingControlComponent::OnPlayerLoaded(Entity* player) {
m_LoadedPlayers++;
LOG("Loading player %i",
Log::Info("Loading player {}",
m_LoadedPlayers);
m_LobbyPlayers.push_back(player->GetObjectID());
}
@ -101,7 +101,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player,
auto* item = inventoryComponent->FindItemByLot(8092);
if (item == nullptr) {
LOG("Failed to find item");
Log::Warn("Failed to find item");
auto* characterComponent = player->GetComponent<CharacterComponent>();
if (characterComponent) {
@ -570,10 +570,10 @@ void RacingControlComponent::Update(float deltaTime) {
// From the first 2 players loading in the rest have a max of 15 seconds
// to load in, can raise this if it's too low
if (m_LoadTimer >= 15) {
LOG("Loading all players...");
Log::Info("Loading all players...");
for (size_t positionNumber = 0; positionNumber < m_LobbyPlayers.size(); positionNumber++) {
LOG("Loading player now!");
Log::Info("Loading player now!");
auto* player =
Game::entityManager->GetEntity(m_LobbyPlayers[positionNumber]);
@ -582,7 +582,7 @@ void RacingControlComponent::Update(float deltaTime) {
return;
}
LOG("Loading player now NOW!");
Log::Info("Loading player now NOW!");
LoadPlayerVehicle(player, positionNumber + 1, true);
@ -732,7 +732,7 @@ void RacingControlComponent::Update(float deltaTime) {
m_Started = true;
LOG("Starting race");
Log::Info("Starting race");
Game::entityManager->SerializeEntity(m_Parent);
@ -837,7 +837,7 @@ void RacingControlComponent::Update(float deltaTime) {
if (player.bestLapTime == 0 || player.bestLapTime > lapTime) {
player.bestLapTime = lapTime;
LOG("Best lap time (%llu)", lapTime);
Log::Info("Best lap time ({})", lapTime);
}
auto* missionComponent =
@ -857,7 +857,7 @@ void RacingControlComponent::Update(float deltaTime) {
player.raceTime = raceTime;
LOG("Completed time %llu, %llu",
Log::Info("Completed time {}, {}",
raceTime, raceTime * 1000);
LeaderboardManager::SaveScore(playerEntity->GetObjectID(), m_ActivityID, static_cast<float>(player.raceTime), static_cast<float>(player.bestLapTime), static_cast<float>(player.finished == 1));
@ -871,11 +871,11 @@ void RacingControlComponent::Update(float deltaTime) {
}
}
LOG("Lapped (%i) in (%llu)", player.lap,
Log::Info("Lapped ({}) in ({})", player.lap,
lapTime);
}
LOG("Reached point (%i)/(%i)", player.respawnIndex,
Log::Info("Reached point ({})/({})", player.respawnIndex,
path->pathWaypoints.size());
break;

View File

@ -176,6 +176,6 @@ float RenderComponent::DoAnimation(Entity* self, const std::string& animation, b
}
}
if (sendAnimation) GameMessages::SendPlayAnimation(self, GeneralUtils::ASCIIToUTF16(animation), priority, scale);
if (returnlength == 0.0f) LOG("WARNING: Unable to find animation {:s} for lot {:d} in any group.", animation, self->GetLOT());
if (returnlength == 0.0f) Log::Warn("Unable to find animation {} for lot {} in any group.", animation, self->GetLOT());
return returnlength;
}

View File

@ -57,7 +57,7 @@ void RocketLaunchpadControlComponent::Launch(Entity* originator, LWOMAPID mapId,
auto* rocket = characterComponent->GetRocket(originator);
if (!rocket) {
LOG("Unable to find rocket!");
Log::Warn("Unable to find rocket!");
return;
}

View File

@ -55,7 +55,7 @@ void SkillComponent::SyncPlayerSkill(const uint32_t skillUid, const uint32_t syn
const auto index = this->m_managedBehaviors.find(skillUid);
if (index == this->m_managedBehaviors.end()) {
LOG("Failed to find skill with uid (%i)!", skillUid, syncId);
Log::Warn("Failed to find skill with uid ({})!", skillUid, syncId);
return;
}
@ -80,7 +80,7 @@ void SkillComponent::SyncPlayerProjectile(const LWOOBJID projectileId, RakNet::B
}
if (index == -1) {
LOG("Failed to find projectile id (%llu)!", projectileId);
Log::Warn("Failed to find projectile id ({})!", projectileId);
return;
}
@ -94,7 +94,7 @@ void SkillComponent::SyncPlayerProjectile(const LWOOBJID projectileId, RakNet::B
auto result = query.execQuery();
if (result.eof()) {
LOG("Failed to find skill id for (%i)!", sync_entry.lot);
Log::Warn("Failed to find skill id for ({})!", sync_entry.lot);
return;
}
@ -396,7 +396,7 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
if (other == nullptr) {
if (entry.branchContext.target != LWOOBJID_EMPTY) {
LOG("Invalid projectile target (%llu)!", entry.branchContext.target);
Log::Warn("Invalid projectile target ({})!", entry.branchContext.target);
}
return;
@ -408,7 +408,7 @@ void SkillComponent::SyncProjectileCalculation(const ProjectileSyncEntry& entry)
auto result = query.execQuery();
if (result.eof()) {
LOG("Failed to find skill id for (%i)!", entry.lot);
Log::Warn("Failed to find skill id for ({})!", entry.lot);
return;
}

View File

@ -199,7 +199,7 @@ bool VendorComponent::SetupItem(LOT item) {
auto itemComponentID = compRegistryTable->GetByIDAndType(item, eReplicaComponentType::ITEM, -1);
if (itemComponentID == -1) {
LOG("Attempted to add item %i with ItemComponent ID -1 to vendor %i inventory. Not adding item!", itemComponentID, m_Parent->GetLOT());
Log::Warn("Attempted to add item {} with ItemComponent ID -1 to vendor {} inventory. Not adding item!", itemComponentID, m_Parent->GetLOT());
return false;
}