Skip to content

Commit

Permalink
Remove GottaGoFast variant for now
Browse files Browse the repository at this point in the history
Its code depended on the SpeedBoots variant, which is now a power-up.
  • Loading branch information
Kha committed May 14, 2015
1 parent 9836c3b commit 98547f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
31 changes: 0 additions & 31 deletions Mod/Variants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,13 @@ public class MyMatchVariants : MatchVariants
public Variant InfiniteArrows;
[PerPlayer]
public Variant NoDodgeCooldowns;
[PerPlayer]
public Variant GottaGoFast;

public MyMatchVariants()
{
// mutually exclusive variants
this.CreateLinks(NoHeadBounce, NoTimeLimit);
this.CreateLinks(NoDodgeCooldowns, ShowDodgeCooldown);
this.CreateLinks(AwfullyFastArrows, AwfullySlowArrows);
this.CreateLinks(SpeedBoots, GottaGoFast);
}
}

Expand All @@ -58,34 +55,6 @@ public override int GetDodgeExitState()
return base.GetDodgeExitState();
}

public override float MaxRunSpeed {
get {
float res = base.MaxRunSpeed;
if (((MyMatchVariants)Level.Session.MatchSettings.Variants).GottaGoFast[this.PlayerIndex]) {
return res * 1.4f;
}
return res;
}
}

public override int NormalUpdate()
{
// SpeedBoots add little dust clouds below our feet... we want those too.
var gottaGoFast = ((MyMatchVariants)Level.Session.MatchSettings.Variants).GottaGoFast[this.PlayerIndex];
bool hasSpeedBoots = Level.Session.MatchSettings.Variants.SpeedBoots[this.PlayerIndex];
if (gottaGoFast) {
typeof(Engine).GetProperty("TimeMult").SetValue(null, Engine.TimeMult * 2f, null);
Level.Session.MatchSettings.Variants.SpeedBoots[this.PlayerIndex] = true;
}
int res = base.NormalUpdate();
if (gottaGoFast) {
typeof(Engine).GetProperty("TimeMult").SetValue(null, Engine.TimeMult / 2f, null);
}
Level.Session.MatchSettings.Variants.SpeedBoots[this.PlayerIndex] = hasSpeedBoots;
((MyMatchVariants)Level.Session.MatchSettings.Variants).GottaGoFast[this.PlayerIndex] = gottaGoFast;
return res;
}

public override void ShootArrow()
{
if (((MyMatchVariants)Level.Session.MatchSettings.Variants).InfiniteArrows[this.PlayerIndex]) {
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ Koala hunters no more.

![](img/noDodgeCooldown.gif?raw=true)

### Gotta Go Fast! ![](Mod/Content/Atlas/menuAtlas/variants/gottaGoFast.png?raw=true)

![](img/gottagofast.gif?raw=true)

## UI Enhancements

### Win Counter
Expand Down

0 comments on commit 98547f6

Please sign in to comment.