- StartCoroutine returns a handle which can be used to stop a coroutine, and coroutines and be given a name to make accessing them easier
- StatusEffect coroutines are stopped when the round ends - Fixed GameServer keeping a reference to the TraitorManager after a round ends (causing traitor messages to appear even if traitors aren't on anymore) - Option to spawn characters near/inside/outside the sub using the spawn command
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Barotrauma
|
||||
{
|
||||
This = 1, Parent = 2, Character = 4, Contained = 8, Nearby = 16, UseTarget = 32, Hull = 64
|
||||
}
|
||||
|
||||
|
||||
private TargetType targetTypes;
|
||||
private string[] targetNames;
|
||||
|
||||
@@ -246,13 +246,13 @@ namespace Barotrauma
|
||||
{
|
||||
ObjectProperty property;
|
||||
|
||||
//if (targetNames!=null && !targetNames.Contains(target.Name)) continue;
|
||||
|
||||
if (!target.ObjectProperties.TryGetValue(propertyNames[i], out property)) continue;
|
||||
|
||||
if (duration > 0.0f)
|
||||
{
|
||||
CoroutineManager.StartCoroutine(ApplyToPropertyOverDuration(duration, property, propertyEffects[i]));
|
||||
CoroutineManager.StartCoroutine(
|
||||
ApplyToPropertyOverDuration(duration, property, propertyEffects[i]), "statuseffect");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -318,6 +318,11 @@ namespace Barotrauma
|
||||
{
|
||||
DelayedEffect.List[i].Update(deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void StopAll()
|
||||
{
|
||||
CoroutineManager.StopCoroutines("statuseffect");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user