mob
Readd_Overlays()
src.overlays = null
for(var/obj/item/I in src)
if(I.Equipped)
src.overlays += I
if(src.Hair)
src.overlays += src.Hair
for(var/obj/H in src)
if(istype(H, /obj/item/helm))
if(H.Equipped)
if(H.helmtype == "Circlet")
src.overlays -= src.Hair
if(src.targetedby)
var/obj/spelltarget/S = new()
var/image/i = S
src.overlays += i
Problem description:
The above proc is what I use to handle most, if not all, changes to overlays. It works just fine after you login, performing all the correct actions without any problems. However, when you logout and have overlays(or something equipped), then log back in, the overlays get stuck on the player, as a part of the icon evidently. Hair, however, is unaffected. It call still be changed and removed as normal.
Also, if you don't have any items equipped, overlays are removed as normal upon logging in, and hair is added normally. Yet if you do have something equipped, it adds the overlays and gets stuck on the icon.
I find this odd. I checked both my login and logout, as well as mob/New and Del, and obj/New and Del. There is nothing in any of the aforementioned procs that alters anything on any items in the players contents, nor anything that alters the players overlays.
What could be the problem? This never gave me any problems until recently, I'd say probably version 420 or so.
Step by Step:
1. Login
2. Equip something, maybe get a haircut
3.Logout
4. Login again
--messed up icon/overlays--
5.Unequip everything
6.Logout
7.Login
--overlays/icon normal, hair (if any) added--