Merge pull request #5482 from Mechoid/End_The_Tyranny_Of_PunPun

Hallucinations now use the old system again.
This commit is contained in:
Atermonera
2018-08-08 20:38:29 -07:00
committed by GitHub
2 changed files with 18 additions and 8 deletions

View File

@@ -349,19 +349,22 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
/obj/item/clothing/suit/space/void, /obj/item/weapon/tank)
/proc/fake_attack(var/mob/living/target)
// var/list/possible_clones = new/list()
var/list/possible_clones = new/list()
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying) continue
// possible_clones += H
clone = H
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
if(H.stat || H.lying)
continue
possible_clones += H
// clone = H
// break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone) return
if(!possible_clones.len)
return
clone = pick(possible_clones)
if(!clone)
return
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(target.loc)