Commit Graph

7 Commits

Author SHA1 Message Date
Josh Dowell 562458200c If we fail to create a convex hull from the supplied points, substitute it for a small sphere.
continuous-integration/drone/push Build encountered an error Details
I found exactly one model in a single map for gmod that causes this to happen, a better solution would be to re-calculate a valid hull from the supplied points, but this'll do since it's such a rare case.
2023-04-11 07:15:10 +01:00
Joshua Ashton be6b64b31e all: Rebase against latest VPhysics Jolt
continuous-integration/drone/push Build encountered an error Details
Bump submodule to 172a99c718bded5faa169ac440517286684fa2f0 and fixup our code to support the latest version.

Additionally, some water changes/fixes.
2023-03-29 18:31:20 +01:00
Magnus Larsen 0c55d0082d collide: Deconstruct CPhysCollide properly
It is necessary to dispatch the correct JPH::Shape dtor, even though
it's stored as a a CPhysCollide*.

This should fix #58
2022-09-21 19:26:07 +01:00
Joshua Ashton 2812b58680
collide: Use std::swap instead of Swap
Swap is something that was added to Desolation's basetypes.h, not present in SDK 2013.
Just use std::swap from STL.
2022-09-01 12:29:36 +01:00
Joshua Ashton c6c1a6dba1 collide: Flip triangle winding in CreateDebugMesh
Closes: #44
2022-09-01 07:34:12 +01:00
Joshua Ashton 25eecb1f35 collide: Support legacy style .phy files
These legacy style .phy files are literally just serialized compact surfaces
and nothing else, with some misc. data shoved into some dummy compartment.

Some props in shipping HL2 still use this format, as they have a .phy, even after their
.qc had the $collisionmodel removed, as they didn't get the stale .phy in the game files deleted.

Closes: #35
2022-08-30 06:06:58 +01:00
Joshua Ashton 11adbb57bd Initial commit 2022-08-29 00:21:50 +01:00