Merge branch 'Joshua-Ashton:main' into main

This commit is contained in:
Bagellll 2022-09-23 04:11:45 -04:00 committed by GitHub
commit dbfe2ae7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 23 deletions

View File

@ -5,6 +5,7 @@ on: [push, pull_request, workflow_dispatch]
jobs: jobs:
windows: windows:
strategy: strategy:
fail-fast: false
matrix: matrix:
source_branch: [sdk2013-sp, sdk2013-mp, asw] source_branch: [sdk2013-sp, sdk2013-mp, asw]
@ -12,21 +13,17 @@ jobs:
steps: steps:
- name: Checkout Mini Source SDK - name: Checkout Mini Source SDK
id: checkout-minisdk
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'Joshua-Ashton/mini-source-sdk' repository: Joshua-Ashton/mini-source-sdk
- name: Checkout VPhysics Jolt - name: Checkout VPhysics Jolt
id: checkout-code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: '${{ matrix.source_branch }}/src/vphysics_jolt' path: ${{ matrix.source_branch }}/src/vphysics_jolt
submodules: recursive submodules: recursive
- name: Find Visual Studio - name: Find Visual Studio
id: find-vs
shell: pwsh
run: | run: |
$installationPath = Get-VSSetupInstance ` $installationPath = Get-VSSetupInstance `
| Select-VSSetupInstance -Require Microsoft.VisualStudio.Workload.NativeDesktop -Latest ` | Select-VSSetupInstance -Require Microsoft.VisualStudio.Workload.NativeDesktop -Latest `
@ -35,9 +32,7 @@ jobs:
| Out-File -FilePath "${Env:GITHUB_ENV}" -Append | Out-File -FilePath "${Env:GITHUB_ENV}" -Append
- name: Build MSVC x86 - name: Build MSVC x86
id: build working-directory: ${{ matrix.source_branch }}/src
shell: pwsh
working-directory: '${{ matrix.source_branch }}/src'
run: | run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" ` & "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } ` | % { , ($_ -Split '=', 2) } `
@ -48,8 +43,7 @@ jobs:
msbuild jolt.sln /nodeReuse:false /t:Rebuild /p:Configuration=Release /p:Platform=x86 /m /v:minimal msbuild jolt.sln /nodeReuse:false /t:Rebuild /p:Configuration=Release /p:Platform=x86 /m /v:minimal
- name: Upload artifacts - name: Upload artifacts
id: upload-artifacts uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with: with:
name: vphysics_jolt_${{ matrix.source_branch }}_win32 name: vphysics_jolt_${{ matrix.source_branch }}_win32
path: ${{ matrix.source_branch }}/game path: ${{ matrix.source_branch }}/game
@ -57,6 +51,7 @@ jobs:
linux: linux:
strategy: strategy:
fail-fast: false
matrix: matrix:
source_branch: [sdk2013-sp, sdk2013-mp] source_branch: [sdk2013-sp, sdk2013-mp]
@ -65,37 +60,30 @@ jobs:
steps: steps:
- name: Install Dependencies - name: Install Dependencies
id: install-deps
shell: bash
run: | run: |
dpkg --add-architecture i386 dpkg --add-architecture i386
apt update apt update
apt install -y build-essential git libstdc++6:i386 gcc-multilib g++-multilib apt install -y build-essential git libstdc++6:i386 gcc-multilib g++-multilib
- name: Checkout Mini Source SDK - name: Checkout Mini Source SDK
id: checkout-minisdk
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: 'Joshua-Ashton/mini-source-sdk' repository: Joshua-Ashton/mini-source-sdk
- name: Checkout VPhysics Jolt - name: Checkout VPhysics Jolt
id: checkout-code
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: '${{ matrix.source_branch }}/src/vphysics_jolt' path: ${{ matrix.source_branch }}/src/vphysics_jolt
submodules: recursive submodules: recursive
- name: Build GCC x86 - name: Build GCC x86
id: build working-directory: ${{ matrix.source_branch }}/src
shell: bash
working-directory: '${{ matrix.source_branch }}/src'
run: | run: |
./createjoltprojects.sh ./createjoltprojects.sh
make -f jolt.mak -j $(nproc) make -f jolt.mak -j $(nproc)
- name: Upload artifacts - name: Upload artifacts
id: upload-artifacts uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v2
with: with:
name: vphysics_jolt_${{ matrix.source_branch }}_linux32 name: vphysics_jolt_${{ matrix.source_branch }}_linux32
path: ${{ matrix.source_branch }}/game path: ${{ matrix.source_branch }}/game

View File

@ -700,7 +700,7 @@ void JoltPhysicsCollision::VCollideUnload( vcollide_t *pVCollide )
{ {
VCollideFreeUserData( pVCollide ); VCollideFreeUserData( pVCollide );
for ( int i = 0; i < pVCollide->solidCount; i++ ) for ( int i = 0; i < pVCollide->solidCount; i++ )
delete pVCollide->solids[ i ]; delete pVCollide->solids[ i ]->ToShape();
delete[] pVCollide->solids; delete[] pVCollide->solids;
delete[] pVCollide->pKeyValues; delete[] pVCollide->pKeyValues;

View File

@ -12,6 +12,8 @@
// Does not and will not contain *any* data. // Does not and will not contain *any* data.
class CPhysCollide class CPhysCollide
{ {
~CPhysCollide() = delete;
public: public:
JPH::Shape* ToShape() JPH::Shape* ToShape()
{ {
@ -42,6 +44,8 @@ public:
// Does not and will not contain *any* data. // Does not and will not contain *any* data.
class CPhysConvex class CPhysConvex
{ {
~CPhysConvex() = delete;
public: public:
JPH::ConvexShape* ToConvexShape() JPH::ConvexShape* ToConvexShape()
{ {