An improved semiclassical method for heavy-ion-induced nuclear reactions