Skip to content

Commit

Permalink
Prevented expressions getting stuck when expression detection is disa…
Browse files Browse the repository at this point in the history
…bled or tracking is lost in `OpenSeeVRMDriver`.
  • Loading branch information
emilianavt committed Aug 15, 2020
1 parent 9ce7d39 commit 8f65c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Examples/OpenSeeVRMDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -846,13 +846,13 @@ void UpdateExpression() {
toggledExpression.triggered = false;

if (!overridden && !trigger) {
if (openSeeExpression.expression == null || openSeeExpression.expression == "" || !expressionMap.ContainsKey(openSeeExpression.expression)) {
if (!openSeeExpression.enabled || openSeeExpression.expressionTime + 15f < Time.time || openSeeExpression.expression == null || openSeeExpression.expression == "" || !expressionMap.ContainsKey(openSeeExpression.expression)) {
currentExpression = null;
} else {
currentExpression = expressionMap[openSeeExpression.expression];
currentExpression.triggered = true;
}
} else if (openSeeExpression.expression != null && openSeeExpression.expression != "" && expressionMap.ContainsKey(openSeeExpression.expression)) {
} else if (openSeeExpression.enabled && openSeeExpression.expressionTime + 15f > Time.time && openSeeExpression.expression != null && openSeeExpression.expression != "" && expressionMap.ContainsKey(openSeeExpression.expression)) {
if (expressionMap[openSeeExpression.expression].additive)
expressionMap[openSeeExpression.expression].triggered = true;
}
Expand Down

0 comments on commit 8f65c02

Please sign in to comment.