Such cases were handled by a variable (as you mentioned) in the past.

Should be no problem.

I think it depends on how the mouse_ent function is implemented and if the changes could be done to the current code.