Build 0.17.13.0
This commit is contained in:
@@ -3,7 +3,6 @@ using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
@@ -18,6 +17,8 @@ namespace Barotrauma.Items.Components
|
||||
const int MaxNodes = 100;
|
||||
const float MaxNodeDistance = 150.0f;
|
||||
|
||||
private bool waitForVoltageRecalculation;
|
||||
|
||||
public struct Node
|
||||
{
|
||||
public Vector2 WorldPosition;
|
||||
@@ -120,6 +121,7 @@ namespace Barotrauma.Items.Components
|
||||
CurrPowerConsumption = powerConsumption;
|
||||
Voltage = 0.0f;
|
||||
|
||||
waitForVoltageRecalculation = true;
|
||||
charging = true;
|
||||
timer = Duration;
|
||||
IsActive = true;
|
||||
@@ -134,6 +136,12 @@ namespace Barotrauma.Items.Components
|
||||
#if CLIENT
|
||||
frameOffset = Rand.Int(electricitySprite.FrameCount);
|
||||
#endif
|
||||
if (waitForVoltageRecalculation)
|
||||
{
|
||||
waitForVoltageRecalculation = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (timer <= 0.0f)
|
||||
{
|
||||
IsActive = false;
|
||||
|
||||
Reference in New Issue
Block a user