Merge pull request #3430 from Citadel-Station-13/upstream-merge-30599
[MIRROR] Moves projectile processing to a subsystem
This commit is contained in:
@@ -214,8 +214,7 @@ Doesn't work on other aliens/AI.*/
|
||||
|
||||
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(user.loc)
|
||||
A.current = U
|
||||
A.preparePixelProjectile(target, get_turf(target), user, params)
|
||||
A.preparePixelProjectile(target, user, params)
|
||||
A.fire()
|
||||
user.newtonian_move(get_dir(U, T))
|
||||
user.adjustPlasma(-p_cost)
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
// redirect the projectile
|
||||
P.original = locate(new_x, new_y, P.z)
|
||||
P.starting = curloc
|
||||
P.current = curloc
|
||||
P.firer = src
|
||||
P.yo = new_y - curloc.y
|
||||
P.xo = new_x - curloc.x
|
||||
|
||||
@@ -360,16 +360,9 @@
|
||||
if(P.starting)
|
||||
var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/turf/curloc = get_turf(H)
|
||||
|
||||
var/turf/target = get_turf(P.starting)
|
||||
// redirect the projectile
|
||||
P.original = locate(new_x, new_y, P.z)
|
||||
P.starting = curloc
|
||||
P.current = curloc
|
||||
P.firer = H
|
||||
P.yo = new_y - curloc.y
|
||||
P.xo = new_x - curloc.x
|
||||
P.Angle = null
|
||||
P.preparePixelProjectile(locate(Clamp(target.x + new_x, 1, world.maxx), Clamp(target.y + new_y, 1, world.maxy), H.z), H)
|
||||
return -1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -444,9 +444,7 @@ Auto Patrol[]"},
|
||||
|
||||
var/obj/item/projectile/A = new projectile (loc)
|
||||
playsound(loc, shoot_sound, 50, 1)
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.preparePixelProjectile(target, src)
|
||||
A.fire()
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/attack_alien(mob/living/carbon/alien/user)
|
||||
|
||||
@@ -145,7 +145,6 @@
|
||||
// redirect the projectile
|
||||
P.original = locate(new_x, new_y, P.z)
|
||||
P.starting = curloc
|
||||
P.current = curloc
|
||||
P.firer = src
|
||||
P.yo = new_y - curloc.y
|
||||
P.xo = new_x - curloc.x
|
||||
|
||||
@@ -362,7 +362,6 @@
|
||||
else if(projectiletype)
|
||||
var/obj/item/projectile/P = new projectiletype(startloc)
|
||||
playsound(src, projectilesound, 100, 1)
|
||||
P.current = startloc
|
||||
P.starting = startloc
|
||||
P.firer = src
|
||||
P.yo = targeted_atom.y - startloc.y
|
||||
@@ -370,6 +369,7 @@
|
||||
if(AIStatus != AI_ON)//Don't want mindless mobs to have their movement screwed up firing in space
|
||||
newtonian_move(get_dir(targeted_atom, targets_from))
|
||||
P.original = targeted_atom
|
||||
P.preparePixelProjectile(targeted_atom, src)
|
||||
P.fire()
|
||||
return P
|
||||
|
||||
|
||||
@@ -182,12 +182,7 @@
|
||||
return
|
||||
var/turf/our_turf = get_turf(src)
|
||||
var/obj/item/projectile/seedling/readied_shot = new /obj/item/projectile/seedling(our_turf)
|
||||
readied_shot.current = our_turf
|
||||
readied_shot.starting = our_turf
|
||||
readied_shot.firer = src
|
||||
readied_shot.original = target
|
||||
readied_shot.yo = target.y - our_turf.y + rand(-1,1)
|
||||
readied_shot.xo = target.x - our_turf.x + rand(-1,1)
|
||||
readied_shot.preparePixelProjectile(target, src, null, rand(-10, 10))
|
||||
readied_shot.fire()
|
||||
playsound(src, projectilesound, 100, 1)
|
||||
|
||||
|
||||
@@ -164,7 +164,6 @@ Difficulty: Very Hard
|
||||
return
|
||||
var/turf/startloc = get_turf(src)
|
||||
var/obj/item/projectile/P = new /obj/item/projectile/colossus(startloc)
|
||||
P.current = startloc
|
||||
P.starting = startloc
|
||||
P.firer = src
|
||||
if(marker)
|
||||
|
||||
Reference in New Issue
Block a user