Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya246 authored Jun 24, 2021
1 parent 1244322 commit bc3c267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routerSnakeMod/routerSnake.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void update(){
if(Mathf.chance(0.008f)){
target = null;
};
if((length > 12 || canDecay) && Mathf.chance(0.0005f * Math.max((float)length, 10))){
if((length > 12 || canDecay) && Mathf.chance(0.0003f * Math.max((float)length, 5))){
if(length == 1){
routerSnakeMod.snakes.remove(this);
}else{
Expand Down Expand Up @@ -99,7 +99,7 @@ public void update(){
x -= Mathf.cosDeg(heading) * 10f;
y -= Mathf.sinDeg(heading) * 10f;
heading = Mathf.angle(x - newBuild.x, y - newBuild.y);
}else if(newBuild.block == Blocks.router && Mathf.chance(0.02f)){
}else if(newBuild.block == Blocks.router && Mathf.chance(0.004f * Math.max(length, 12))){
if(Mathf.chance(0.005f * length)){
routerSnakeMod.snakes.add(new routerSnake(x, y, true, length / 2));
length = canDecay ? length / 2 : Math.max(length / 2, 12);
Expand Down

0 comments on commit bc3c267

Please sign in to comment.