There are too many unrelated changes in the patch, one of them being even wrong. Just to clarify, the "opacity >= 100" check will never be true now. Let's keep it simple, and make only the necessary changes here.