mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-30 15:36:21 +01:00
Merge pull request #874 from Datraen/MechGunFix
Updating things to current projectile code.
This commit is contained in:
@@ -519,9 +519,5 @@
|
||||
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
|
||||
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
|
||||
src.projectiles--
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
sleep(2)
|
||||
A.launch(target)
|
||||
return
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
playsound(chassis, fire_sound, fire_volume, 1)
|
||||
projectiles--
|
||||
var/P = new projectile(curloc)
|
||||
Fire(P, target, aimloc)
|
||||
Fire(P, target)
|
||||
if(fire_cooldown)
|
||||
sleep(fire_cooldown)
|
||||
if(auto_rearm)
|
||||
@@ -46,16 +46,9 @@
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/proc/Fire(atom/A, atom/target, turf/aimloc)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/proc/Fire(atom/A, atom/target)
|
||||
var/obj/item/projectile/P = A
|
||||
P.shot_from = src.name
|
||||
P.original = target
|
||||
P.starting = P.loc
|
||||
P.current = P.loc
|
||||
P.firer = chassis.occupant
|
||||
P.yo = aimloc.y - P.loc.y
|
||||
P.xo = aimloc.x - P.loc.x
|
||||
P.process()
|
||||
P.launch(target)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "general energy weapon"
|
||||
@@ -235,7 +228,7 @@
|
||||
projectile_energy_cost = 1000
|
||||
equip_cooldown = 60
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive/Fire(atom/movable/AM, atom/target, turf/aimloc)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive/Fire(atom/movable/AM, atom/target)
|
||||
var/obj/item/missile/M = AM
|
||||
M.primed = 1
|
||||
..()
|
||||
|
||||
@@ -56,8 +56,6 @@
|
||||
return
|
||||
|
||||
last_shot = world.time
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = get_turf(A)
|
||||
|
||||
var/projectile = /obj/item/projectile/beam/stun
|
||||
if(emagged)
|
||||
@@ -66,13 +64,7 @@
|
||||
playsound(loc, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
|
||||
var/obj/item/projectile/P = new projectile(loc)
|
||||
|
||||
P.original = A
|
||||
P.starting = T
|
||||
P.current = T
|
||||
P.yo = U.y - T.y
|
||||
P.xo = U.x - T.x
|
||||
spawn()
|
||||
P.process()
|
||||
P.launch(A)
|
||||
return
|
||||
|
||||
// Assembly
|
||||
|
||||
@@ -191,13 +191,7 @@
|
||||
if (!istype(target, /turf))
|
||||
qdel(A)
|
||||
return
|
||||
A.current = target
|
||||
A.starting = get_turf(src)
|
||||
A.original = get_turf(target)
|
||||
A.yo = target:y - start:y
|
||||
A.xo = target:x - start:x
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
A.launch(target)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
|
||||
Reference in New Issue
Block a user