From c9604f710fe27c8607b9880108554f41ccf99e8a Mon Sep 17 00:00:00 2001 From: Slartibarty Date: Mon, 29 Aug 2022 23:32:17 +0100 Subject: [PATCH] listener: Fix a typo causing collision damage to be applied in full There was a typo in vjolt_listener_contact.h where it would get the velocity of the first object twice, which was wrong, and this was causing damage to be applied in full --- vphysics_jolt/vjolt_listener_contact.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vphysics_jolt/vjolt_listener_contact.h b/vphysics_jolt/vjolt_listener_contact.h index a293605..966c571 100644 --- a/vphysics_jolt/vjolt_listener_contact.h +++ b/vphysics_jolt/vjolt_listener_contact.h @@ -418,7 +418,7 @@ private: // Unused... , m_ContactSpeed( vec3_origin ) , m_Velocity0( pObject1->GetBody()->GetLinearVelocity() ) - , m_Velocity1( pObject1->GetBody()->GetLinearVelocity() ) + , m_Velocity1( pObject2->GetBody()->GetLinearVelocity() ) { }