Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe. This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown. * Fix a bunch of warnings * More warning fixes * Use new DateTime serializer to get rid of ISerializationHooks in changelog code. * Get rid of some more ISerializationHooks for enums * And a little more * Apply suggestions from code review Co-authored-by: 0x6273 <0x40@keemail.me> --------- Co-authored-by: 0x6273 <0x40@keemail.me>
This commit is contained in:
committed by
GitHub
parent
d0c174388c
commit
68ce53ae17
@@ -30,13 +30,13 @@ namespace Content.Client.Physics.Controllers
|
||||
private void OnUpdatePredicted(EntityUid uid, InputMoverComponent component, ref UpdateIsPredictedEvent args)
|
||||
{
|
||||
// Enable prediction if an entity is controlled by the player
|
||||
if (uid == _playerManager.LocalPlayer?.ControlledEntity)
|
||||
if (uid == _playerManager.LocalEntity)
|
||||
args.IsPredicted = true;
|
||||
}
|
||||
|
||||
private void OnUpdateRelayTargetPredicted(EntityUid uid, MovementRelayTargetComponent component, ref UpdateIsPredictedEvent args)
|
||||
{
|
||||
if (component.Source == _playerManager.LocalPlayer?.ControlledEntity)
|
||||
if (component.Source == _playerManager.LocalEntity)
|
||||
args.IsPredicted = true;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Content.Client.Physics.Controllers
|
||||
// Enable prediction if an entity is being pulled by the player.
|
||||
// Disable prediction if an entity is being pulled by some non-player entity.
|
||||
|
||||
if (component.Puller == _playerManager.LocalPlayer?.ControlledEntity)
|
||||
if (component.Puller == _playerManager.LocalEntity)
|
||||
args.IsPredicted = true;
|
||||
else if (component.Puller != null)
|
||||
args.BlockPrediction = true;
|
||||
@@ -84,7 +84,7 @@ namespace Content.Client.Physics.Controllers
|
||||
{
|
||||
base.UpdateBeforeSolve(prediction, frameTime);
|
||||
|
||||
if (_playerManager.LocalPlayer?.ControlledEntity is not {Valid: true} player)
|
||||
if (_playerManager.LocalEntity is not {Valid: true} player)
|
||||
return;
|
||||
|
||||
if (RelayQuery.TryGetComponent(player, out var relayMover))
|
||||
|
||||
Reference in New Issue
Block a user