mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-12 02:18:07 +00:00
Replace Quaternion with glm math (#1868)
This commit is contained in:
@@ -108,7 +108,7 @@ void NtCombatChallengeServer::OnChildLoaded(Entity& self, GameMessages::ChildLoa
|
||||
auto* const child = Game::entityManager->GetEntity(childLoaded.childID);
|
||||
|
||||
if (child) {
|
||||
child->SetRotation(NiQuaternion::FromEulerAngles(child->GetRotation().GetEulerAngles() += NiPoint3(0, PI, 0))); // rotate 180 degrees
|
||||
child->SetRotation(QuatUtils::FromEuler(QuatUtils::Euler(child->GetRotation()) += NiPoint3(0, PI, 0))); // rotate 180 degrees
|
||||
}
|
||||
|
||||
self.SetVar(u"currentTargetID", child->GetObjectID());
|
||||
|
@@ -48,7 +48,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
RenderComponent::PlayAnimation(user, shockAnim);
|
||||
|
||||
const auto dir = self->GetRotation().GetRightVector();
|
||||
const auto dir = QuatUtils::Right(self->GetRotation());
|
||||
|
||||
GameMessages::SendKnockback(user->GetObjectID(), self->GetObjectID(), self->GetObjectID(), 0, { dir.x * 15, 5, dir.z * 15 });
|
||||
|
||||
|
@@ -18,7 +18,7 @@ void NtSentinelWalkwayServer::OnStartup(Entity* self) {
|
||||
force = 115;
|
||||
}
|
||||
|
||||
const auto forward = self->GetRotation().GetRightVector() * -1;
|
||||
const auto forward = QuatUtils::Right(self->GetRotation()) * -1;
|
||||
|
||||
phantomPhysicsComponent->SetEffectType(ePhysicsEffectType::PUSH);
|
||||
phantomPhysicsComponent->SetDirectionalMultiplier(force);
|
||||
|
Reference in New Issue
Block a user