Update content for PhysicsMapComponent (#4462)

* Update content for PhysicsMapComponent

* Fix command

* Cache broadphasesystem
This commit is contained in:
metalgearsloth
2021-08-23 15:02:03 +10:00
committed by GitHub
parent c0e9dd1f47
commit 8878f4dc8f
3 changed files with 11 additions and 9 deletions

View File

@@ -46,11 +46,11 @@ namespace Content.Shared.Friction
configManager.UnsubValueChanged(CCVars.StopSpeed, SetStopSpeed);
}
public override void UpdateBeforeMapSolve(bool prediction, PhysicsMap map, float frameTime)
public override void UpdateBeforeMapSolve(bool prediction, SharedPhysicsMapComponent mapComponent, float frameTime)
{
base.UpdateBeforeMapSolve(prediction, map, frameTime);
base.UpdateBeforeMapSolve(prediction, mapComponent, frameTime);
foreach (var body in map.AwakeBodies)
foreach (var body in mapComponent.AwakeBodies)
{
// Only apply friction when it's not a mob (or the mob doesn't have control)
if (body.Deleted ||