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

Commit 9262c81

Browse files
committed
(Hopefully) fix OnCollideWithMO call for single-atom particles
1 parent 229ffee commit 9262c81

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Entities/MovableObject.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,7 @@ bool MovableObject::OnMOHit(HitData &hd)
744744
}
745745

746746
bool MovableObject::OnMOHit(MovableObject *pOtherMO) {
747-
if (pOtherMO != this) { RunScriptedFunctionInAppropriateScripts("OnCollideWithMO", false, false, {pOtherMO, pOtherMO ? pOtherMO->GetRootParent() : nullptr}); }
748-
return false;
747+
return false;
749748
}
750749

751750
void MovableObject::SetHitWhatTerrMaterial(unsigned char matID) {

System/Atom.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,8 @@ namespace RTE {
849849
// Report the hit to both MO's in collision
850850
m_LastHit.RootBody[HITOR] = m_LastHit.Body[HITOR]->GetRootParent();
851851
m_LastHit.RootBody[HITEE] = m_LastHit.Body[HITEE]->GetRootParent();
852-
m_LastHit.RootBody[HITOR]->OnMOHit(m_LastHit.RootBody[HITEE]);
853-
m_LastHit.RootBody[HITEE]->OnMOHit(m_LastHit.RootBody[HITOR]);
852+
m_LastHit.RootBody[HITOR]->OnMOHit(m_LastHit);
853+
m_LastHit.RootBody[HITEE]->OnMOHit(m_LastHit);
854854
}
855855

856856
///////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)