Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 9bcb79d

Browse files
committed
Use RotateOffset
1 parent 9e3c4ab commit 9bcb79d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Entities/AtomGroup.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ namespace RTE {
680680
}
681681
} while (segRatio != 1.0F || hitStep && /*!linSegTraj.GetFloored().IsZero() &&*/ !halted);
682682

683-
ResolveMOSIntersection(position, rotation);
683+
ResolveMOSIntersection(position);
684684

685685
if (!scenePreLocked) { g_SceneMan.UnlockScene(); }
686686

@@ -1368,7 +1368,7 @@ namespace RTE {
13681368

13691369
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
13701370

1371-
bool AtomGroup::ResolveMOSIntersection(Vector &position, Matrix &rotation) {
1371+
bool AtomGroup::ResolveMOSIntersection(Vector &position) {
13721372
if (!m_OwnerMO->m_HitsMOs) {
13731373
return true;
13741374
}
@@ -1383,8 +1383,7 @@ namespace RTE {
13831383

13841384
// First go through all Atoms to find the first intersection and get the intersected MO
13851385
for (Atom *atom : m_Atoms) {
1386-
atomOffset = atom->GetOffset().GetXFlipped(m_OwnerMO->IsHFlipped());
1387-
atomOffset *= rotation;
1386+
atomOffset = m_OwnerMO->RotateOffset(atom->GetOffset());
13881387
atom->SetupPos(position + atomOffset);
13891388
atomPos = atom->GetCurrentPos();
13901389
hitMOID = g_SceneMan.GetMOIDPixel(atomPos.GetFloorIntX(), atomPos.GetFloorIntY());

Entities/AtomGroup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ namespace RTE {
323323
/// <param name="position">Current position of the owner MO.</param>
324324
/// <param name="rotation">Current rotation of the owner MO.</param>
325325
/// <returns>Whether all intersections were successfully resolved.</returns>
326-
bool ResolveMOSIntersection(Vector &position, Matrix &rotation);
326+
bool ResolveMOSIntersection(Vector &position);
327327
#pragma endregion
328328

329329
#pragma region Debug

0 commit comments

Comments
 (0)