$N$-player games and mean-field games with smooth dependence on past absorptions [N-Player games and mean-field games with smooth dependence on past absorptions]