update_material_switch function

Change the value of a material_switch on the client