Updated StatusSystem Struct for Bool Comparisons
This commit is contained in:
parent
31a6a5d98e
commit
c880eb27ac
@ -34,7 +34,7 @@ void UStatusSystem::TickComponent(float DeltaTime, ELevelTick TickType, FActorCo
|
|||||||
{
|
{
|
||||||
if (StatusEffect.TimeTillExpiry > UGameplayStatics::GetRealTimeSeconds(GetWorld()))
|
if (StatusEffect.TimeTillExpiry > UGameplayStatics::GetRealTimeSeconds(GetWorld()))
|
||||||
{
|
{
|
||||||
//ActiveStatusEffects.RemoveAt(ActiveStatusEffects.Find(StatusEffect));
|
ActiveStatusEffects.Remove(StatusEffect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,11 @@ struct FActiveStatusEffect
|
|||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
UStatusEffect* StatusEffect;
|
UStatusEffect* StatusEffect;
|
||||||
|
|
||||||
|
bool operator==(const FActiveStatusEffect& Comp) const
|
||||||
|
{
|
||||||
|
return StatusEffect == Comp.StatusEffect;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
|
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
|
||||||
|
Loading…
Reference in New Issue
Block a user