addHook("LinedefExecute", function(line, mo, sector)
    if not (mo and mo.player) then return end

    local amount, delay
    
	//quick udmf/binary conditional check
    if udmf then
        amount = line.args[0] or 1
        delay = line.args[1] or TICRATE
    else
        amount = FixedInt(line.frontside.textureoffset)
        delay = FixedInt(line.frontside.rowoffset)
    end

    if not mo.player.powers[pw_flashing]
    and not mo.player.powers[pw_super]
    and not mo.player.powers[pw_invulnerability]
    and mo.player.powers[pw_shield] != SH_ARMAGEDDON then
		if mo.player.raddelay and mo.player.raddelay > 0 then
            mo.player.raddelay = $ - 1
        elseif RSR and RSR.GamemodeActive() then
            P_DamageMobj(mo, nil, nil, amount*10, DMG_WATER)
            mo.player.raddelay = delay
        elseif mo.player.rings > 0 then
            mo.player.rings = $ - amount
            S_StartSound(mo, sfx_antiri)
            mo.player.raddelay = delay
        else
            P_KillMobj(mo)
            if G_RingSlingerGametype() then
                print(mo.player.name.." died to a radioactive hazard.")
            end
        end
    end
end, "RS_AN_RADIOACTIVE")

addHook("NetVars", function(network)
    for player in players.iterate do
        player.raddelay = network(player.raddelay)
    end
end)