Skip to content

Commit 7fc24b3

Browse files
jonwilxezon
authored andcommitted
Fix issues with crushing
1 parent 682c16b commit 7fc24b3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/game/logic/object/update/physicsupdate.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ bool PhysicsBehavior::Check_For_Overlap_Collision(Object *other)
950950
info.m_in.m_deathType = DEATH_CRUSHED;
951951
info.m_in.m_sourceID = obj->Get_ID();
952952
info.m_in.m_amount = 0.0f;
953-
obj->Attempt_Damage(&info);
953+
other->Attempt_Damage(&info);
954954
}
955955

956956
const Coord3D *other_pos = other->Get_Position();
@@ -1048,9 +1048,9 @@ bool PhysicsBehavior::Check_For_Overlap_Collision(Object *other)
10481048

10491049
if (Perps_Logically_Equal(f5, f9)) {
10501050
if (f12 < pos8.Length()) {
1051-
i1 = 0;
1052-
} else {
10531051
i1 = 2;
1052+
} else {
1053+
i1 = 0;
10541054
}
10551055
} else if (Perps_Logically_Equal(f5, f7)) {
10561056
if (f12 < pos5.Length()) {
@@ -1153,8 +1153,8 @@ bool PhysicsBehavior::Check_For_Overlap_Collision(Object *other)
11531153
info.m_in.m_damageType = DAMAGE_CRUSH;
11541154
info.m_in.m_deathType = DEATH_CRUSHED;
11551155
info.m_in.m_sourceID = obj->Get_ID();
1156-
info.m_in.m_amount = 0.0f;
1157-
obj->Attempt_Damage(&info);
1156+
info.m_in.m_amount = 999999.0f;
1157+
other->Attempt_Damage(&info);
11581158
}
11591159
}
11601160

0 commit comments

Comments
 (0)