Fixed Powered ItemComponents (not components deriving from Powered) never resetting their voltage after receiving power, causing them to stay powered indefinitely. Closes #247
This commit is contained in:
@@ -61,9 +61,9 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
base.Update(deltaTime, cam);
|
||||
UpdateOnActiveEffects(deltaTime);
|
||||
|
||||
currPowerConsumption = Math.Abs(targetForce)/100.0f * powerConsumption;
|
||||
currPowerConsumption = Math.Abs(targetForce) / 100.0f * powerConsumption;
|
||||
|
||||
if (powerConsumption == 0.0f) voltage = 1.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user