Fixes transforming weapons resetting their throw speed. (#43684)

* Fixes transforming weapons resetting their throw speed.

* mhm

* Let's make this simple.
This commit is contained in:
AnturK
2019-04-25 12:09:34 -04:00
committed by moo
parent 383007fffe
commit 180c87f8e0
3 changed files with 1 additions and 3 deletions
-1
View File
@@ -221,7 +221,6 @@ GLOBAL_LIST_EMPTY(explosions)
if(!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 = EXPLOSION_THROW_SPEED //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
I.throw_at(throw_at, throw_range, EXPLOSION_THROW_SPEED)
//wait for the lists to repop
-1
View File
@@ -534,7 +534,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/after_throw(datum/callback/callback)
if (callback) //call the original callback
. = callback.Invoke()
throw_speed = initial(throw_speed) //explosions change this.
item_flags &= ~IN_INVENTORY
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage
@@ -153,7 +153,7 @@
skipcatch = TRUE
blocked = TRUE
else if(I)
if((I.throw_speed >= EMBED_THROWSPEED_THRESHOLD) || I.embedding.embedded_ignore_throwspeed_threshold)
if(((throwingdatum ? throwingdatum.speed : I.throw_speed) >= EMBED_THROWSPEED_THRESHOLD) || I.embedding.embedded_ignore_throwspeed_threshold)
if(can_embed(I))
if(prob(I.embedding.embed_chance) && !has_trait(TRAIT_PIERCEIMMUNE))
throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)