despawn projectile instead of weird movement
This commit is contained in:
+2
-5
@@ -37,11 +37,8 @@ export default class Ability {
|
||||
effect: function straightShotEffect(caster, cursor) {
|
||||
const ability = this
|
||||
const straightShotCollision = function straightShotCollision(projectile, collidingEntity) {
|
||||
if (!projectile.memory.hit) {
|
||||
collidingEntity.damage(ability.damage)
|
||||
projectile.memory.hit = true
|
||||
projectile.destination = collidingEntity.position.clone()
|
||||
}
|
||||
collidingEntity.damage(ability.damage)
|
||||
projectile.despawn()
|
||||
}
|
||||
|
||||
const projectile = new Projectile({
|
||||
|
||||
Reference in New Issue
Block a user