Skip to content

Commit

Permalink
Change projectile behaviour with reinforced to not hit stuff multiple…
Browse files Browse the repository at this point in the history
… times and teleport around #1520
  • Loading branch information
bonii-xx committed Apr 13, 2015
1 parent 8018cd4 commit 992b2a8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/tconstruct/library/entity/ProjectileBase.java
Expand Up @@ -294,10 +294,15 @@ public void onHitEntity(MovingObjectPosition movingobjectposition) {
this.setDead();
else
{
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
this.motionX = Math.max(-0.1,Math.min(0.1, -motionX));
this.motionY = 0.2;
this.motionZ = Math.max(-0.1,Math.min(0.1, -motionZ));
this.ticksInAir = 0;
this.posX = movingobjectposition.entityHit.posX;
this.posY = movingobjectposition.entityHit.posY + movingobjectposition.entityHit.height/2d;
this.posZ = movingobjectposition.entityHit.posZ;
this.defused = true;
//this.shootingEntity = movingobjectposition.entityHit;
}
}
}
Expand Down

0 comments on commit 992b2a8

Please sign in to comment.