mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Removed pooling from projectiles, made firelocks work properly.
Should hopefully fix any Bump issues.
This commit is contained in:
@@ -13,6 +13,9 @@
|
||||
var/proj_trail_icon = 'icons/obj/wizard.dmi'
|
||||
var/proj_trail_icon_state = "trail"
|
||||
|
||||
/obj/item/projectile/spell_projectile/ex_act()
|
||||
return
|
||||
|
||||
/obj/item/projectile/spell_projectile/process_step()
|
||||
..()
|
||||
if(!isnull(src.loc))
|
||||
@@ -32,10 +35,17 @@
|
||||
/obj/item/projectile/spell_projectile/proc/prox_cast(var/list/targets)
|
||||
if(loc)
|
||||
carried.prox_cast(targets, src)
|
||||
returnToPool(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/projectile/spell_projectile/Bump(var/atom/A)
|
||||
if(loc)
|
||||
prox_cast(carried.choose_prox_targets())
|
||||
return
|
||||
|
||||
/obj/item/projectile/spell_projectile/OnDeath()
|
||||
if(loc)
|
||||
prox_cast(carried.choose_prox_targets())
|
||||
return
|
||||
|
||||
/obj/item/projectile/spell_projectile/seeking
|
||||
|
||||
@@ -26,16 +26,10 @@
|
||||
var/ex_flash = 5
|
||||
|
||||
/spell/targeted/projectile/dumbfire/fireball/prox_cast(var/list/targets, spell_holder)
|
||||
targets = ..()
|
||||
explosion(get_turf(spell_holder), ex_severe, ex_heavy, ex_light, ex_flash)
|
||||
|
||||
//PROJECTILE
|
||||
|
||||
/obj/item/projectile/spell_projectile/fireball
|
||||
name = "fireball"
|
||||
icon_state = "fireball"
|
||||
|
||||
/obj/item/projectile/spell_projectile/fireball/OnDeath()
|
||||
if(carried && loc)
|
||||
carried.prox_cast(carried.choose_prox_targets(), src)
|
||||
return
|
||||
icon_state = "fireball"
|
||||
@@ -16,11 +16,12 @@
|
||||
duration = 10
|
||||
proj_step_delay = 5
|
||||
|
||||
/spell/targeted/projectile/magic_missile/prox_cast(var/list/targets)
|
||||
/spell/targeted/projectile/magic_missile/prox_cast(var/list/targets, atom/spell_holder)
|
||||
targets = ..()
|
||||
spell_holder.visible_message("<span class='danger'>\The [spell_holder] pops with a flash!</span>")
|
||||
for(var/mob/living/M in targets)
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
M.Stun(3)
|
||||
M.Weaken(3)
|
||||
M.adjustFireLoss(10)
|
||||
return
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ If the spell_projectile is seeking, it will update its target every process and
|
||||
|
||||
var/proj_step_delay = 1 //lower = faster
|
||||
var/cast_prox_range = 1
|
||||
var/special_prox = 0
|
||||
|
||||
/spell/targeted/projectile/cast(list/targets, mob/user = usr)
|
||||
|
||||
@@ -22,14 +21,11 @@ If the spell_projectile is seeking, it will update its target every process and
|
||||
proj_type = text2path(proj_type) // sanity filters
|
||||
|
||||
for(var/atom/target in targets)
|
||||
var/obj/item/projectile/projectile = getFromPool(proj_type, user.loc)
|
||||
var/obj/item/projectile/projectile = new proj_type(user.loc, user.dir)
|
||||
|
||||
if(!projectile)
|
||||
return
|
||||
|
||||
projectile.icon = initial(projectile.icon)
|
||||
projectile.icon_state = initial(projectile.icon_state)
|
||||
|
||||
projectile.original = target
|
||||
projectile.loc = get_turf(user)
|
||||
projectile.starting = get_turf(user)
|
||||
@@ -54,8 +50,4 @@ If the spell_projectile is seeking, it will update its target every process and
|
||||
return targets
|
||||
|
||||
/spell/targeted/projectile/proc/prox_cast(var/list/targets, var/atom/movable/spell_holder)
|
||||
if(special_prox)
|
||||
for(var/atom/target in targets)
|
||||
if(get_dist(target, spell_holder) > cast_prox_range)
|
||||
targets -= target
|
||||
return targets
|
||||
Reference in New Issue
Block a user