Skip to content

Commit

Permalink
Don't rotate when paused
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith committed Aug 1, 2024
1 parent cc2b655 commit 7476ba4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/drunkustry/graphics/DrunkShaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@ public void applyOther(){

float dir = 0;
if(settings.getBool("du-aberration-rotation")){
float sTime = Time.time / 60f;
float amount = Mathf.sin(sTime * 1.7f)
- Mathf.sin(sTime * 2.3f)
+ Mathf.sin(sTime * 0.2f)
+ Mathf.cos(sTime * 3f)
- Mathf.sin(sTime * 1.2f);
amount *= settings.getFloat("du-aberration-rotation-speed") / 2f;
aberDir += amount * Time.delta;
if(!state.isPaused()){
float sTime = Time.time / 60f;
float amount = Mathf.sin(sTime * 1.7f)
- Mathf.sin(sTime * 2.3f)
+ Mathf.sin(sTime * 0.2f)
+ Mathf.cos(sTime * 3f)
- Mathf.sin(sTime * 1.2f);
amount *= settings.getFloat("du-aberration-rotation-speed") / 2f;
aberDir += amount * Time.delta;
}

dir = aberDir;
}
Expand Down

0 comments on commit 7476ba4

Please sign in to comment.