mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 21:42:41 +00:00
Hostile mobs now use new projectile code.
Kudos to PsiOmegaDelta for pointing it out.
This commit is contained in:
@@ -155,22 +155,21 @@
|
||||
var/target = target_mob
|
||||
visible_message("\red <b>[src]</b> fires at [target]!", 1)
|
||||
|
||||
var/tturf = get_turf(target)
|
||||
if(rapid)
|
||||
spawn(1)
|
||||
Shoot(tturf, src.loc, src)
|
||||
Shoot(target, src.loc, src)
|
||||
if(casingtype)
|
||||
new casingtype(get_turf(src))
|
||||
spawn(4)
|
||||
Shoot(tturf, src.loc, src)
|
||||
Shoot(target, src.loc, src)
|
||||
if(casingtype)
|
||||
new casingtype(get_turf(src))
|
||||
spawn(6)
|
||||
Shoot(tturf, src.loc, src)
|
||||
Shoot(target, src.loc, src)
|
||||
if(casingtype)
|
||||
new casingtype(get_turf(src))
|
||||
else
|
||||
Shoot(tturf, src.loc, src)
|
||||
Shoot(target, src.loc, src)
|
||||
if(casingtype)
|
||||
new casingtype
|
||||
|
||||
@@ -187,18 +186,7 @@
|
||||
playsound(user, projectilesound, 100, 1)
|
||||
if(!A) return
|
||||
|
||||
if (!istype(target, /turf))
|
||||
qdel(A)
|
||||
return
|
||||
A.current = target
|
||||
A.starting = get_turf(src)
|
||||
A.original = get_turf(target)
|
||||
A.setup_trajectory(A.starting, A.original)
|
||||
A.yo = target:y - start:y
|
||||
A.xo = target:x - start:x
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
return
|
||||
A.launch(target, "chest")
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
if(prob(break_stuff_probability))
|
||||
|
||||
@@ -277,24 +277,3 @@
|
||||
|
||||
/obj/item/projectile/beam/pulse/drone
|
||||
damage = 10
|
||||
|
||||
/obj/item/projectile/beam/drone/after_move()
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/carbon/human/H = locate() in T
|
||||
if(!H)
|
||||
return 0
|
||||
if(H.lying)
|
||||
Bump(H, 1) // Force the bump since mobs lying don't trigger it. We'll only do this for drones since they don't target the mob they target the turf.
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/projectile/beam/pulse/drone/after_move()
|
||||
var/turf/T = get_turf(src)
|
||||
var/mob/living/carbon/human/H = locate() in T
|
||||
if(!H)
|
||||
return 0
|
||||
if(H.lying)
|
||||
Bump(H, 1) // Force the bump since mobs lying don't trigger it. We'll only do this for drones since they don't target the mob they target the turf.
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -298,8 +298,6 @@
|
||||
|
||||
before_move()
|
||||
Move(location.return_turf())
|
||||
if(after_move())
|
||||
return 1
|
||||
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
@@ -319,9 +317,6 @@
|
||||
/obj/item/projectile/proc/before_move()
|
||||
return 0
|
||||
|
||||
/obj/item/projectile/proc/after_move()
|
||||
return 0
|
||||
|
||||
/obj/item/projectile/proc/setup_trajectory(turf/startloc, turf/targloc, var/x_offset = 0, var/y_offset = 0)
|
||||
// setup projectile state
|
||||
starting = startloc
|
||||
|
||||
Reference in New Issue
Block a user