Optimise flashlights (#2468)
Flashlights were calling dirty EVERY TICK so this just means they only call it when absoluetely necessary which saves a lot. Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -11,18 +11,17 @@ namespace Content.Shared.GameObjects.Components
|
||||
|
||||
protected abstract bool HasCell { get; }
|
||||
|
||||
protected const int StatusLevels = 6;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
protected sealed class HandheldLightComponentState : ComponentState
|
||||
{
|
||||
public HandheldLightComponentState(float? charge, bool hasCell) : base(ContentNetIDs.HANDHELD_LIGHT)
|
||||
public byte? Charge { get; }
|
||||
|
||||
public HandheldLightComponentState(byte? charge) : base(ContentNetIDs.HANDHELD_LIGHT)
|
||||
{
|
||||
Charge = charge;
|
||||
HasCell = hasCell;
|
||||
}
|
||||
|
||||
public float? Charge { get; }
|
||||
|
||||
public bool HasCell { get; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user