Fixed AND/OR or components staying inactive until they receive their first signal. Closes #387
This commit is contained in:
@@ -5,14 +5,15 @@ namespace Barotrauma.Items.Components
|
||||
class OrComponent : AndComponent
|
||||
{
|
||||
public OrComponent(Item item, XElement element)
|
||||
: base (item, element)
|
||||
: base(item, element)
|
||||
{
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
bool sendOutput = false;
|
||||
for (int i = 0; i<timeSinceReceived.Length; i++)
|
||||
for (int i = 0; i < timeSinceReceived.Length; i++)
|
||||
{
|
||||
if (timeSinceReceived[i] <= timeFrame) sendOutput = true;
|
||||
timeSinceReceived[i] += deltaTime;
|
||||
|
||||
Reference in New Issue
Block a user