Skip to content

Commit

Permalink
Fix reflected tinker projectiles not hitting stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Dec 7, 2014
1 parent a1bde95 commit 633814d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/tconstruct/tools/TinkerToolEvents.java
Expand Up @@ -23,6 +23,7 @@
import tconstruct.TConstruct;
import tconstruct.armor.player.TPlayerStats;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.entity.ProjectileBase;
import tconstruct.library.event.*;
import tconstruct.library.tools.*;
import tconstruct.util.ItemHelper;
Expand Down Expand Up @@ -276,6 +277,12 @@ public void onAttack (LivingAttackEvent event)
// projectile.prevRotationYaw -= 180.0F;

// not needed at the client since it gets the absolute values sent


// tinker projectiles don't check for stuff hit to prevent weird behaviour.
// we have to de-defuse them so the reflected projectiles can hit stuff again
if(projectile instanceof ProjectileBase)
((ProjectileBase) projectile).defused = false;
}
}
else
Expand Down

1 comment on commit 633814d

@TherminatorX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Would be interesting to see what happens when a reflect-battle starts. One arrow, two battlesigns, one loser. Interesting minigame to try out with the guys on FC. Make sure it's recorded. :)

Please sign in to comment.