fixes bouncing lampposts and other odd physics things (#174)

This commit is contained in:
Dethrace Engineering Department 2022-09-28 20:42:22 +13:00 committed by GitHub
parent 76ea16aabe
commit 19ace40cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -3410,7 +3410,7 @@ br_scalar ThreePointCollRec(br_scalar* f, br_matrix4* m, br_scalar* d, br_vector
LOG_TRACE("(%p, %p, %p, %p, %p, %p)", f, m, d, tau, n, c);
ts = ThreePointColl(f, m, d);
if (*f >= 0.0 && f[1] >= 0.0 && f[2] >= 0.0 && ts >= 0.000001) {
if (f[0] >= 0.0f && f[1] >= 0.0f && f[2] >= 0.0f && ts >= 0.000001f) {
c->infinite_mass = 256;
return ts;
}
@ -3432,7 +3432,7 @@ br_scalar ThreePointCollRec(br_scalar* f, br_matrix4* m, br_scalar* d, br_vector
m->m[0][0] = ((float*)m->m)[5 * i];
m->m[1][0] = m->m[j][i];
m->m[0][1] = m->m[i][j];
m->m[1][1] = ((float*)m->m)[5 * i];
m->m[1][1] = ((float*)m->m)[5 * j];
tau[0] = tau[i];
tau[1] = tau[j];
n[0] = n[i];