more formatting & const

This commit is contained in:
jadebenn 2024-12-14 19:03:37 -06:00
parent 514732d395
commit 43681b4494

View File

@ -3723,21 +3723,17 @@ void GameMessages::HandlePetTamingTryBuild(RakNet::BitStream& inStream, Entity*
bool clientFailed; bool clientFailed;
inStream.Read(brickCount); inStream.Read(brickCount);
bricks.reserve(brickCount); bricks.reserve(brickCount);
for (uint32_t i = 0; i < brickCount; i++) { for (uint32_t i = 0; i < brickCount; i++) {
Brick brick; Brick brick;
inStream.Read(brick); inStream.Read(brick);
bricks.push_back(brick); bricks.push_back(brick);
} }
clientFailed = inStream.ReadBit(); clientFailed = inStream.ReadBit();
auto* petComponent = PetComponent::GetTamingPet(entity->GetObjectID()); auto* const petComponent = PetComponent::GetTamingPet(entity->GetObjectID());
if (petComponent == nullptr) { if (petComponent == nullptr) {
return; return;
} }
@ -3747,11 +3743,9 @@ void GameMessages::HandlePetTamingTryBuild(RakNet::BitStream& inStream, Entity*
void GameMessages::HandleNotifyTamingBuildSuccess(RakNet::BitStream& inStream, Entity* entity, const SystemAddress& sysAddr) { void GameMessages::HandleNotifyTamingBuildSuccess(RakNet::BitStream& inStream, Entity* entity, const SystemAddress& sysAddr) {
NiPoint3 position; NiPoint3 position;
inStream.Read(position); inStream.Read(position);
auto* petComponent = PetComponent::GetTamingPet(entity->GetObjectID()); auto* const petComponent = PetComponent::GetTamingPet(entity->GetObjectID());
if (petComponent == nullptr) { if (petComponent == nullptr) {
return; return;
} }