Skip to content

Commit

Permalink
Make Shoot no longer rotate shooters.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcernat committed Aug 14, 2013
1 parent 651e752 commit 1abd1b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Expand Up @@ -12,7 +12,6 @@
import net.aufdemrand.denizen.objects.dEntity;
import net.aufdemrand.denizen.objects.dList;
import net.aufdemrand.denizen.objects.dLocation;
import net.aufdemrand.denizen.objects.dMaterial;
import net.aufdemrand.denizen.objects.dScript;
import net.aufdemrand.denizen.scripts.ScriptEntry;
import net.aufdemrand.denizen.scripts.commands.AbstractCommand;
Expand All @@ -25,10 +24,7 @@
import net.aufdemrand.denizen.utilities.entity.Position;
import net.aufdemrand.denizen.utilities.entity.Rotation;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Projectile;
import org.bukkit.scheduler.BukkitRunnable;
Expand Down Expand Up @@ -192,19 +188,6 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
aH.debugObj("speed", speed) + aH.debugObj("duration", new Duration(maxRuns * 2)) : "") +
(script != null ? aH.debugObj("script", script) : ""));

// If the shooter is not a player, always rotate it to face the destination
// of the projectile, but if the shooter is a player, only rotate him/her
// if he/she is not looking in the correct general direction

if (shooter != null) {

if (!originEntity.isPlayer() ||
Rotation.isFacingLocation(shooter, destination, 45) == false) {

Rotation.faceLocation(shooter, destination);
}
}

// Go through all the entities, spawning/teleporting and rotating them

for (dEntity entity : entities) {
Expand Down
Expand Up @@ -7,7 +7,7 @@ public enum Gravity {
LEASH_HITCH("LeashKnot", 0.115),
PAINTING("Painting", 0.115),
ARROW("Arrow", 0.115),
SNOWBALL("Snowball", 0.115),
SNOWBALL("Snowball", 0.075),
FIREBALL("Fireball", 0.115),
SMALL_FIREBALL("SmallFireball", 0.115),
ENDER_PEARL("ThrownEnderpearl", 0.115),
Expand Down

0 comments on commit 1abd1b3

Please sign in to comment.