[Bugfix] Fix Cross Grid Magboots (#39910)
* Augh * Remove that * ViewVariables property so it can be debugged at the very least. * Remove --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cfb13f98e1
commit
36c9f2006d
@@ -52,7 +52,7 @@ public sealed class SharedMagbootsSystem : EntitySystem
|
||||
if (TryComp<MovedByPressureComponent>(user, out var moved))
|
||||
moved.Enabled = !state;
|
||||
|
||||
_gravity.RefreshWeightless(user, !state);
|
||||
_gravity.RefreshWeightless(user);
|
||||
|
||||
if (state)
|
||||
_alerts.ShowAlert(user, ent.Comp.MagbootsAlert);
|
||||
|
||||
@@ -12,6 +12,6 @@ public sealed partial class GravityAffectedComponent : Component
|
||||
/// <summary>
|
||||
/// If true, this entity will be considered "weightless"
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[ViewVariables, AutoNetworkedField]
|
||||
public bool Weightless = true;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@ public abstract partial class SharedGravitySystem : EntitySystem
|
||||
|
||||
/// <summary>
|
||||
/// Overload of <see cref="RefreshWeightless(Entity{GravityAffectedComponent?})"/> which also takes a bool for the weightlessness value we want to change to.
|
||||
/// This method is LOAD BEARING for UninitializedSaveTest. DO NOT REMOVE IT.
|
||||
/// This method should only be called if there is no chance something can override the weightless value you're trying to change to.
|
||||
/// This is really only the case if you're applying a weightless value that overrides non-conditionally from events or are a grid with the gravity component.
|
||||
/// </summary>
|
||||
/// <param name="entity">The entity we are updating the weightless status of</param>
|
||||
/// <param name="weightless">The weightless value we are trying to change to, helps avoid needless networking</param>
|
||||
@@ -142,7 +143,7 @@ public abstract partial class SharedGravitySystem : EntitySystem
|
||||
if (args.OldParent == args.Transform.GridUid)
|
||||
return;
|
||||
|
||||
RefreshWeightless((entity.Owner, entity.Comp), !EntityGridOrMapHaveGravity((entity, args.Transform)));
|
||||
RefreshWeightless((entity.Owner, entity.Comp));
|
||||
}
|
||||
|
||||
private void OnBodyTypeChanged(Entity<GravityAffectedComponent> entity, ref PhysicsBodyTypeChangedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user