mob/pc
proc/enflame(M)
if(fire)
overlays += /obj/overlay/flames
var/i = 1
while(i)
world << i
if(!fire)
return
hp -= 5
if(checkDeath(M))
i = null
fire = 0
world << fire
return
sleep(25)
obj/bullets
density=1
icon_state="bullet"
var/owner
Bump(turf/T)
if(istype(T,/turf/walls))
del(src)
fire
icon='flamer.dmi'
Bump(mob/pc/M)
//here is the effects
if(istype(M,/mob/pc))//if it is a mob
if(M.hp<0)
del(src)
return
M.hp -= 20
M.fire = 1
M.enflame(owner)
M.checkDeath(owner)
..()
del(src)
mob/proc/checkDeath(killer)
if(hp <= 0)
var/client/K = killer
var/client/V = src.client
var/obj/corpse/M = new(loc)
for(var/obj/Inventory/Equipment/O in src)
if(src.vars["[O.identifier]"])
src.vars["[O.identifier]"]=null
O.suffix=null
O.OnRemoval()
O.Move(src.loc)
M.gold = src.client.gold*0.5
M.gold = round(M.gold, 1)
src.client.gold = M.gold
src.client.gold = round(src.client.gold, 1)
src.hp = 100
src.overlays = null
src.client.gun = "none"
src.client.clips = 0
src.ammoRefresh(0)
world << "\red <b>[src] was killed by [killer]"
K.kills += 1
Problem description:
I the enflame() proc to loop 'til mob/pc's checkdeath(owner) is true... owner is the client of the person that shot the bullet... I don't know what's wrong but I strongly suspect that damn dirty loop in the enflame() proc... I'm crap at loops...