ID:916400
 
(See the best response by DarkCampainger.)
Code:
    Corpse
text = "{C*{x"
isCorpse = 1
New(mob/M)
owner = "[M.ClassColor][M.name][M.Reset]"
loc = M.loc
keywords = list("[M.name]", "corpse")
for(var/obj/Item/A in M.contents)
if(prob(A.dropchance) && !A.equip)
contents += A
M.contents -= A
spawn(100)
mb_msgout("[owner]'s corpse decays.", oview(0))
del(src)


Problem description:

When a player dies they spawn a corpse and have a chance of dropping gear in them.. for some reason even if they aren't in the same turf but anywhere on the map it will still show that the corpse decayed.

Best response
oview() defaults to being centered on the usr (which probably ends up being the killer most of the time). You need to specify src as the second argument.
thanks