Skip to content

Commit 185e562

Browse files
authored
Merge branch 'Facepunch:master' into categorize-base-components
2 parents bb3ea2d + 3efe8ef commit 185e562

70 files changed

Lines changed: 977 additions & 507 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pull_request.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
with:
1414
github-token: ${{ secrets.GITHUB_TOKEN }}
1515
script: |
16-
const requiredChecks = ['Tests', 'Formatting'];
16+
const requiredChecks = ['format', 'tests'];
1717
1818
const pr = context.payload.pull_request;
1919
if (!pr) {
@@ -33,16 +33,8 @@ jobs:
3333
3434
if (!match || match.conclusion !== 'success') {
3535
const status = match ? (match.conclusion ?? match.status ?? 'unknown') : 'missing';
36-
core.warning(`Required check '${requiredCheck}' did not pass (${status}). Removing triaged label.`);
37-
38-
await github.rest.issues.removeLabel({
39-
owner: context.repo.owner,
40-
repo: context.repo.repo,
41-
issue_number: pr.number,
42-
name: 'triaged'
43-
});
44-
45-
throw new Error('Cannot triage until required checks succeed.');
36+
core.warning(`Required check '${requiredCheck}' did not pass (${status}).`);
37+
throw new Error('Cannot triage until required checks succeed. Remove and re-add the triaged label to retry.');
4638
}
4739
}
4840

.github/workflows/pull_request_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions:
88
contents: read
99

1010
jobs:
11-
format:
11+
tests:
1212
runs-on: [ windows-latest ]
1313
steps:
1414
- name: Full Checkout

engine/Definitions/engine/engine.globals.def

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,6 @@ native static class global as NativeEngine.EngineGlobal
6666
bool SourceEngineFrame( CMaterialSystem2AppSystemDict appDict, double currentTime, double previousTime );
6767
void SourceEngineShutdown( CMaterialSystem2AppSystemDict appDict, bool forced );
6868

69-
inline void UpdateWindowSize()
70-
{
71-
VideoModeChange_t* pModeChange = g_pEngineServiceMgr->GetVideoModeChange();
72-
if ( pModeChange )
73-
{
74-
g_pRenderService->SetVideoMode( pModeChange->m_deviceInfo );
75-
pModeChange->ModeChangeComplete();
76-
}
77-
78-
SwapChainHandle_t m_hSwapChain = g_pEngineServiceMgr->GetEngineSwapChain();
79-
RenderViewport_t renderViewport;
80-
renderViewport.Init( 0, 0, 512, 512, 0, 1 );
81-
82-
CRenderContextPtr pRenderContext( g_pRenderDevice, RenderTargetDesc_t( m_hSwapChain, RENDER_SRGB ), "Clear" );
83-
pRenderContext->Clear( Vector4D( 0, 0, 0, 0 ) );
84-
pRenderContext->SetViewports( 1, &renderViewport );
85-
86-
pRenderContext->Submit();
87-
g_pRenderDevice->Present( m_hSwapChain );
88-
}
89-
9069
inline float GetDiagonalDpi()
9170
{
9271
return Plat_GetDPI();

engine/Definitions/resources/CPhysAggregateData.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ native class VPhysXBodyPart_t
7777
float m_flInertiaScale;
7878
float m_flLinearDamping;
7979
float m_flAngularDamping;
80+
float m_flGravityScale;
8081

8182
bool m_bOverrideMassCenter;
8283
Vector3 m_vMassCenterOverride;

engine/Sandbox.Engine/Game/Game/Game.Scene.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ internal static void Render( SwapChainHandle_t swapChain )
7070

7171
internal static void Shutdown()
7272
{
73+
IsClosing = true;
7374
IsPlaying = false;
7475

7576
ActiveScene?.Destroy();
7677
ActiveScene = null;
78+
79+
IsClosing = false;
7780
}
7881
}

engine/Sandbox.Engine/Protocol.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class Protocol
1313
/// <summary>
1414
/// We cannot talk to servers or clients with a network protocol different to this.
1515
/// </summary>
16-
public static int Network => 1094;
16+
public static int Network => 1095;
1717
}
1818

1919
// Api Versions
@@ -24,6 +24,7 @@ public static class Protocol
2424

2525

2626
// Network Versions
27+
// 1095. 23rd November 2025 - Snapshot parent salt
2728
// 1094. 10th November 2025 - Network visibility
2829
// 1093. 13th October 2025 - LZ4 compression
2930
// 1092. 1st October 2025 - Networking optimizations

engine/Sandbox.Engine/Resources/Model/Model.Physics.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ public sealed class BodyPart
214214
public float AngularDamping => native.m_flAngularDamping;
215215
public bool OverrideMassCenter => native.m_bOverrideMassCenter;
216216
public Vector3 MassCenterOverride => native.m_vMassCenterOverride;
217+
public float GravityScale => native.m_flGravityScale;
217218

218219
internal BodyPart( PhysicsGroupDescription physicsGroupDescription, string boneName, VPhysXBodyPart_t vPhysXBodyPart_t, Transform transform )
219220
{

engine/Sandbox.Engine/Scene/Components/Collider/ModelCollider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ protected override IEnumerable<PhysicsShape> CreatePhysicsShapes( PhysicsBody ta
142142

143143
if ( part.AngularDamping > 0 )
144144
targetBody.AngularDamping = part.AngularDamping;
145+
146+
if ( part.GravityScale != 1.0f )
147+
{
148+
targetBody.DefaultGravityScale = part.GravityScale;
149+
targetBody.GravityScale = part.GravityScale;
150+
}
145151
}
146152
}
147153

engine/Sandbox.Engine/Scene/Components/Collider/ModelPhysics.PhysicsCreate.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ private void CreateParts( PhysicsGroupDescription physics, Transform world, Comp
184184
body.MassOverride = part.Mass;
185185
body.OverrideMassCenter = part.OverrideMassCenter;
186186
body.MassCenterOverride = part.MassCenterOverride;
187+
body.GravityScale = part.GravityScale;
187188
body.GameObjectSource = GameObject;
188189

189190
var bodyTransform = body.WorldTransform;

engine/Sandbox.Engine/Scene/GameObject/GameObject.Network.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,13 @@ void Msg_RequestTakeOwnership( ushort snapshotVersion )
279279
/// Set the parent of this networked object.
280280
/// </summary>
281281
[Rpc.Broadcast]
282-
void Msg_SetParent( Guid id, Transform transform, ushort snapshotVersion )
282+
void Msg_SetParent( Guid id, bool keepWorldPosition )
283283
{
284284
if ( _net is null ) return;
285285

286286
var caller = Rpc.Caller;
287-
if ( caller == Connection.Local ) return;
287+
if ( caller == Connection.Local )
288+
return;
288289

289290
// Can this caller set the parent?
290291
if ( !caller.IsHost && !_net.HasControl( caller ) )
@@ -302,8 +303,7 @@ void Msg_SetParent( Guid id, Transform transform, ushort snapshotVersion )
302303
return;
303304
}
304305

305-
_net.LocalSnapshotState.Version = snapshotVersion;
306-
SetParentFromNetwork( parentObject, transform );
306+
SetParentFromNetwork( parentObject, keepWorldPosition );
307307
}
308308

309309
/// <summary>

0 commit comments

Comments
 (0)