about summary refs log tree commit diff
path: root/src/PhysicsMath.h
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-08-09 21:54:05 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-08-09 21:54:05 +0700
commit497deaf4774f6f2c478c52ff092a6eb85f2e0939 (patch)
treef793bb5aa4fd83e31b30adc98e2133ba176b84eb /src/PhysicsMath.h
parent1e83457eb3d786f553d77ece0b95f9aca641e524 (diff)
downloadblackshades-497deaf4774f6f2c478c52ff092a6eb85f2e0939.tar.gz
Disable NPC's footsteps and clean up sound loading 1.3.4
https://todo.sr.ht/~cnx/blackshades/13
Diffstat (limited to 'src/PhysicsMath.h')
-rw-r--r--src/PhysicsMath.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PhysicsMath.h b/src/PhysicsMath.h
index 7eb13c5..c6c320c 100644
--- a/src/PhysicsMath.h
+++ b/src/PhysicsMath.h
@@ -452,7 +452,8 @@ inline	Matrix3x3	Matrix3x3::Inverse(void)
 
 				e31*e22*e13;
 
-	if (d == 0) d = 1;
+	if (abs(d) < 0.01f)
+		d = 1;
 
 	return	Matrix3x3(	(e22*e33-e23*e32)/d,