Merge pull request #13443 from MrStonedOne/DONTWAIT-IKNOWWHATYOURTHINKING-YOUDONTNEEDMYRETURN-DONTWAITCAUSEISLEEP

changes `spawn() throw_at` to `throw_at_fast set waitfor = 0`
This commit is contained in:
Razharas
2015-12-06 19:52:06 +03:00
11 changed files with 32 additions and 44 deletions
+5 -6
View File
@@ -134,12 +134,11 @@
var/throw_dir = get_dir(epicenter,T)
for(var/obj/item/I in T)
spawn(0) //Simultaneously not one at a time
if(I && !I.anchored)
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
I.throw_at(throw_at, throw_range, 2)//Throw it at 2 speed, this is purely visual anyway.
if(I && !I.anchored)
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
I.throw_at_fast(throw_at, throw_range, 2)//Throw it at 2 speed, this is purely visual anyway.
var/took = (world.timeofday-start)/10
+3 -4
View File
@@ -467,10 +467,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
bloody_hands_mob = null
/obj/item/singularity_pull(S, current_size)
spawn(0) //this is needed or multiple items will be thrown sequentially and not simultaneously
if(current_size >= STAGE_FOUR)
throw_at(S,14,3, spin=0)
else ..()
if(current_size >= STAGE_FOUR)
throw_at_fast(S,14,3, spin=0)
else ..()
/obj/item/acid_act(acidpwr, acid_volume)
. = 1
@@ -116,12 +116,11 @@
add_logs(user, target, "fired at", src)
playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
for(var/obj/item/ITD in loadedItems) //Item To Discharge
spawn(0)
loadedItems.Remove(ITD)
loadedWeightClass -= ITD.w_class
ITD.throw_speed = pressureSetting * 2
ITD.loc = get_turf(src)
ITD.throw_at(target, pressureSetting * 5, pressureSetting * 2,user)
loadedItems.Remove(ITD)
loadedWeightClass -= ITD.w_class
ITD.throw_speed = pressureSetting * 2
ITD.loc = get_turf(src)
ITD.throw_at_fast(target, pressureSetting * 5, pressureSetting * 2,user)
if(pressureSetting >= 3 && user)
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
user.Weaken(3)