diff --git a/dGame/dComponents/PhantomPhysicsComponent.cpp b/dGame/dComponents/PhantomPhysicsComponent.cpp index bae79d8d..a65df484 100644 --- a/dGame/dComponents/PhantomPhysicsComponent.cpp +++ b/dGame/dComponents/PhantomPhysicsComponent.cpp @@ -62,11 +62,12 @@ PhantomPhysicsComponent::PhantomPhysicsComponent(Entity* parent, const int32_t c m_RespawnPos = GeneralUtils::TryParse(respawnPos, NiPoint3Constant::ZERO); const auto respawnRot = GeneralUtils::SplitString(m_Parent->GetVarAsString(u"rspRot"), '\x1f'); - m_RespawnRot = NiQuaternion( + m_RespawnRot = respawnRot.size() >= 4 ? NiQuaternion( GeneralUtils::TryParse(respawnRot[0], 1.0f), GeneralUtils::TryParse(respawnRot[1], 0.0f), GeneralUtils::TryParse(respawnRot[2], 0.0f), - GeneralUtils::TryParse(respawnRot[3], 0.0f)); + GeneralUtils::TryParse(respawnRot[3], 0.0f)) + : QuatUtils::IDENTITY; } // HF - RespawnPoints. Legacy respawn entity. diff --git a/dGame/dComponents/TriggerComponent.cpp b/dGame/dComponents/TriggerComponent.cpp index 92fa5f49..19384938 100644 --- a/dGame/dComponents/TriggerComponent.cpp +++ b/dGame/dComponents/TriggerComponent.cpp @@ -404,7 +404,7 @@ void TriggerComponent::HandleSetPhysicsVolumeEffect(Entity* targetEntity, std::v phantomPhysicsComponent->SetDirection(direction); } - if (argArray.size() > 5) { + if (argArray.size() > 6) { const uint32_t min = GeneralUtils::TryParse(argArray.at(6), 0); phantomPhysicsComponent->SetMin(min); diff --git a/dGame/dGameMessages/GameMessageHandler.cpp b/dGame/dGameMessages/GameMessageHandler.cpp index 40c3e913..e7aa97f9 100644 --- a/dGame/dGameMessages/GameMessageHandler.cpp +++ b/dGame/dGameMessages/GameMessageHandler.cpp @@ -62,7 +62,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System User* usr = UserManager::Instance()->GetUser(sysAddr); if (!usr) { - LOG("Failed to find a logged in user for (%llu), aborting GM: %4i, %s!", sysAddr.ToString(), messageID, StringifiedEnum::ToString(messageID).data()); + LOG("Failed to find a logged in user for (%llu), aborting GM: %4i, %s!", objectID, messageID, StringifiedEnum::ToString(messageID).data()); return; } diff --git a/dScripts/02_server/Map/General/StoryBoxInteractServer.cpp b/dScripts/02_server/Map/General/StoryBoxInteractServer.cpp index a19a87d4..a5ce92cd 100644 --- a/dScripts/02_server/Map/General/StoryBoxInteractServer.cpp +++ b/dScripts/02_server/Map/General/StoryBoxInteractServer.cpp @@ -44,7 +44,7 @@ void StoryBoxInteractServer::OnUse(Entity* self, Entity* user) { flagMsg.Send(); if (!flagMsg.flag) { auto* const character = user->GetCharacter(); - if (character) user->GetCharacter()->SetPlayerFlag(boxFlag, true); + if (character) character->SetPlayerFlag(boxFlag, true); GameMessages::SendFireEventClientSide(self->GetObjectID(), user->GetSystemAddress(), u"achieve", LWOOBJID_EMPTY, 0, -1, LWOOBJID_EMPTY); } }