Skip to content

Commit 0c48cea

Browse files
authored
Merge pull request #29 from Misfiy/dev
0.4.2
2 parents a337320 + 4c11369 commit 0c48cea

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

SecretAPI/Features/Effects/IGravityEffect.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@ internal static void Initialize()
2121
{
2222
PlayerEvents.UpdatedEffect += ev =>
2323
{
24-
Vector3 multi = Vector3.one;
24+
Vector3 multi = new(0f, -19.6f, 0f);
25+
bool isAffected = false;
2526
foreach (StatusEffectBase effectBase in ev.Player.ActiveEffects)
2627
{
2728
if (effectBase is not IGravityEffect gravityEffect)
2829
continue;
2930

31+
isAffected = true;
3032
multi.x *= gravityEffect.GravityMultiplier.x;
3133
multi.y *= gravityEffect.GravityMultiplier.y;
3234
multi.z *= gravityEffect.GravityMultiplier.z;
3335
}
3436

35-
ev.Player.Gravity = multi;
37+
if (isAffected)
38+
ev.Player.Gravity = multi;
3639
};
3740
}
3841
}
39-
}
42+
}

0 commit comments

Comments
 (0)