Fixed inbuilt jetpack not working for non engine hardsuits.

This commit is contained in:
xxalpha
2015-04-10 18:08:52 +01:00
parent 1736ba7af3
commit dcdb922d04
2 changed files with 6 additions and 5 deletions
@@ -15,10 +15,11 @@
var/obj/item/weapon/tank/jetpack/J = back
if((movement_dir || J.stabilization_on) && J.allow_thrust(0.01, src))
return 1
if(istype(wear_suit, /obj/item/clothing/suit/space/hardsuit/engine) && isturf(loc)) //Second check is so you can't use a jetpack in a mech
var/obj/item/clothing/suit/space/hardsuit/engine/C = wear_suit
if((movement_dir || C.jetpack.stabilization_on) && C.jetpack.allow_thrust(0.01, src))
return 1
if(istype(wear_suit, /obj/item/clothing/suit/space/hardsuit) && isturf(loc)) //Second check is so you can't use a jetpack in a mech
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
if(C.jetpack)
if((movement_dir || C.jetpack.stabilization_on) && C.jetpack.allow_thrust(0.01, src))
return 1
return 0
@@ -668,7 +668,7 @@
if(istype(H.back, /obj/item/weapon/tank/jetpack))
J = H.back
if(istype(H.wear_suit,/obj/item/clothing/suit/space/hardsuit)) //copypasta but faster implementation currently
var/obj/item/clothing/suit/space/hardsuit/engine/C = H.wear_suit
var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit
P = C.jetpack
if(J)
if(J.allow_thrust(0.01, H))