Skip to content

Commit

Permalink
v0.1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pdcook committed Jun 13, 2021
1 parent cbb8e6d commit ef624f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Binary file modified PCE.dll
Binary file not shown.
14 changes: 7 additions & 7 deletions PCE/PCE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace PCE
{
[BepInDependency("com.willis.rounds.unbound", BepInDependency.DependencyFlags.HardDependency)]
[BepInPlugin("pykess.rounds.plugins.pykesscardexpansion", "Pykess's Card Expansion (PCE)", "0.1.6.0")]
[BepInPlugin("pykess.rounds.plugins.pykesscardexpansion", "Pykess's Card Expansion (PCE)", "0.1.6.1")]
[BepInProcess("Rounds.exe")]
public class PCE : BaseUnityPlugin
{
Expand Down Expand Up @@ -133,16 +133,16 @@ private static void Prefix(CharacterStatModifiers __instance, Vector2 damage, bo
opstats.GetAdditionalData().normalGravity = false;
opgrav.gravityForce *= __instance.GetAdditionalData().gravityMultiplierOnDoDamage;

__instance.StartCoroutine(GravityEffectCountDown(__instance, opstats, opgrav, orig_gravityForce, Time.realtimeSinceStartup, __instance.GetAdditionalData().gravityDurationOnDoDamage));
__instance.StartCoroutine(GravityEffectCountDown(__instance, damagedPlayer, opstats, opgrav, orig_gravityForce, Time.realtimeSinceStartup, __instance.GetAdditionalData().gravityDurationOnDoDamage));

}

}
}

private static IEnumerator GravityEffectCountDown(CharacterStatModifiers CSM_instance, CharacterStatModifiers damaged_CSM, Gravity damaged_gravity, float orig_gravityForce, float effectStart, float effectDuration)
private static IEnumerator GravityEffectCountDown(CharacterStatModifiers CSM_instance, Player damagedPlayer, CharacterStatModifiers damaged_CSM, Gravity damaged_gravity, float orig_gravityForce, float effectStart, float effectDuration)
{
while(!damaged_CSM.GetAdditionalData().normalGravity && Time.realtimeSinceStartup < effectStart+effectDuration)
while((!damaged_CSM.GetAdditionalData().normalGravity && Time.realtimeSinceStartup < effectStart+effectDuration) || damagedPlayer.data.dead)
{
yield return new WaitForSecondsRealtime(0.1f);
}
Expand Down Expand Up @@ -1597,11 +1597,11 @@ public static void OnDiscombobulateActivate(int playerID, float duration)

stats.movementSpeed *= -1f;

Unbound.Instance.StartCoroutine(DiscombobulateEffectCountdown(stats, orig_movementspeed, Time.realtimeSinceStartup, duration));
Unbound.Instance.StartCoroutine(DiscombobulateEffectCountdown(stats, player, orig_movementspeed, Time.realtimeSinceStartup, duration));
}
private static IEnumerator DiscombobulateEffectCountdown(CharacterStatModifiers CSM_instance, float orig_movementspeed, float effectStart, float effectDuration)
private static IEnumerator DiscombobulateEffectCountdown(CharacterStatModifiers CSM_instance, Player effectedPlayer, float orig_movementspeed, float effectStart, float effectDuration)
{
while (CSM_instance.movementSpeed != orig_movementspeed && Time.realtimeSinceStartup < effectStart + effectDuration)
while ((CSM_instance.movementSpeed != orig_movementspeed && Time.realtimeSinceStartup < effectStart + effectDuration) || effectedPlayer.data.dead)
{
yield return new WaitForSecondsRealtime(0.1f);
}
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ A massive thanks to the people who helped me learn how to mod, especially Ascyst
- Cards without art do not display properly in the card bar, this is an issue with the newest version of UnboundLib
- Discombobulate does not have any particle effects when activated

- v0.1.6.1: bugfix
- Once again, fixing gravity effects between rounds

### Suggestions, Bug Reports, and Troubleshooting
-------------------------------------------------

Expand Down

0 comments on commit ef624f8

Please sign in to comment.