//Reverted change, somehow broke between PV versions
freeslot(
"sfx_rick")
sfxinfo[sfx_rick] = {
		flags = SF_X2AWAYSOUND
}
//Thanks to Spectrum for this small script
addHook("ThinkFrame", do
  if gamemap == 377 then
    for p in players.iterate
      if p.mo and p.mo.valid 
        if p.mo.x >= -13060*FRACUNIT and p.mo.x <= -8956*FRACUNIT and p.mo.y >= 11004*FRACUNIT and p.mo.y <= 15108*FRACUNIT and p.pflags & PF_GODMODE
          p.pflags = $1 & ~PF_GODMODE --So you can't cheat others in arena
          CONS_Printf(p, "God Mode is disabled in the arena.")
        elseif p.mo.x >= 13888*FRACUNIT and p.mo.x <= 15904*FRACUNIT and p.mo.y >= 15584*FRACUNIT and p.mo.y <= 17184*FRACUNIT and p.pflags & PF_GODMODE
          p.pflags = $1 & ~PF_GODMODE --Haha funny fake teleporter
          CONS_Printf(p, "A higher power disabled God Mode.")
        elseif p.mo.x >= 5563*FRACUNIT and p.mo.x <= 5675*FRACUNIT and p.mo.y >= -4896*FRACUNIT and p.mo.y <= -4816*FRACUNIT and p.pflags & PF_GODMODE
          p.pflags = $1 & ~PF_GODMODE --So you cant spam the button as much when god moded, you have to dodge the crusher.
          CONS_Printf(p, "The button doesnt like god mode.")
		elseif p.playerstate == PST_LIVE and p.mo.flags & MF_NOCLIPHEIGHT
		  p.mo.flags = $1 & ~MF_NOCLIPHEIGHT
		  CONS_Printf(p, "I'm not allowing clipping through the floor here.")
		elseif p.skin == kombifreeman and p.pflags & PF_NOCLIP
		  p.pflags = $1 & ~PF_NOCLIP
		  CONS_Printf(p, "Gordon will fly into the void if he tries to noclip.")
        end
      end
    end
  end
end)

//Reset the score per game for shooting range
addHook("ThinkFrame", do
  if gamemap == 416 then
    for p in players.iterate
      if p.mo and p.mo.valid 
        if p.mo.x >= 4712*FRACUNIT and p.mo.x <= 5736*FRACUNIT and p.mo.y >= 11232*FRACUNIT and p.mo.y <= 11264*FRACUNIT
          p.score = 0
		elseif p.playerstate == PST_LIVE and p.mo.flags & MF_NOCLIPHEIGHT
		  p.mo.flags = $1 & ~MF_NOCLIPHEIGHT
		  CONS_Printf(p, "I'm not allowing clipping through the floor here.")
        end
      end
    end
  end
end)

//Dye Collectable Egos Sky Blue
addHook("MobjSpawn", function(mobj)
	if gamemap == 377
		if ((mobj.type == MT_EGOTOAD) or (mobj.type == MT_DECOREGO) or (mobj.type == MT_EGODRIP))
		mobj.colorized = true
		mobj.color = SKINCOLOR_SKY
		end
	end
end)

freeslot(
	"MT_FLICKY_EGO", "MT_FLICKY_EGO_CENTER"
)

//Randomly Colored Segways
addHook("MobjSpawn", function(mo)
	mo.color = P_RandomRange(1, #skincolors - 1)
end, MT_FLICKY_EGO)