mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 17:38:08 +00:00
Replace Quaternion with glm math (#1868)
This commit is contained in:
@@ -36,7 +36,7 @@ void AgSpiderBossMessage::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
||||
auto box = GetBox(self);
|
||||
// knockback the target
|
||||
auto forward = self->GetRotation().GetForwardVector();
|
||||
auto forward = QuatUtils::Forward(self->GetRotation());
|
||||
box.boxTarget = target->GetObjectID();
|
||||
GameMessages::SendPlayFXEffect(target->GetObjectID(), 1378, u"create", "pushBack");
|
||||
RenderComponent::PlayAnimation(target, "knockback-recovery");
|
||||
|
@@ -10,8 +10,8 @@ void GfBanana::SpawnBanana(Entity* self) {
|
||||
const auto rotation = self->GetRotation();
|
||||
|
||||
position.y += 12;
|
||||
position.x -= rotation.GetRightVector().x * 5;
|
||||
position.z -= rotation.GetRightVector().z * 5;
|
||||
position.x -= QuatUtils::Right(rotation).x * 5;
|
||||
position.z -= QuatUtils::Right(rotation).z * 5;
|
||||
|
||||
EntityInfo info{};
|
||||
|
||||
|
@@ -22,7 +22,7 @@ struct SGEnemy {
|
||||
|
||||
struct SGConstants {
|
||||
Vector3 playerStartPosition;
|
||||
Quaternion playerStartRotation;
|
||||
Quaternion playerStartRotation = QuatUtils::IDENTITY;
|
||||
LOT cannonLot;
|
||||
uint32_t impactSkillID;
|
||||
LOT projectileLot;
|
||||
|
@@ -273,7 +273,7 @@ void NsConcertInstrument::RepositionPlayer(Entity* self, Entity* player) {
|
||||
case Keyboard:
|
||||
position.SetX(position.GetX() - 0.45f);
|
||||
position.SetZ(position.GetZ() + 0.75f);
|
||||
rotation = NiQuaternion::CreateFromAxisAngle(position, -0.8f); // Slight rotation to make the animation sensible
|
||||
rotation = QuatUtils::AxisAngle(position, -0.8f); // Slight rotation to make the animation sensible
|
||||
break;
|
||||
case Drum:
|
||||
position.SetZ(position.GetZ() - 0.5f);
|
||||
|
Reference in New Issue
Block a user