Perhaps nobody needed a game like Wednesday night more than Matt Barnes.

His second season with the Clippers has been far from idyllic. Injuries, flagrant fouls and a lack of consistency have plagued him since the summer.

“It’s been a rough season for me with all of the injuries in and out and trying to catch a flow, working so hard to get back in shape,” Barnes said after scoring a season-high 25 points against the Mavericks.

Until going 5-for-10 from 3-point range Wednesday, Barnes was shooting just 22.5 percent from distance (9-for-40) and 32.9 percent from the field since returning from a lacerated retina in his left eye. After missing nine of his 10 shots against the Magic on Jan. 6, Barnes, who is widely considered one of the hardest working players on the team, stayed on the Staples Center court for about 45 minutes postgame getting in extra work.

Sensing that Barnes may have been pressing a little bit too hard, Clippers head coach Doc Rivers pulled Barnes into his office. 

“[I told him] that I love him and it’s going to work out,” Rivers said. “Really, that’s basically what I told him. You don’t miss all of training camp and all of the games that you’ve missed and then walk into the NBA and play well. It just doesn’t happen. It happens to a few, the 1-percenters. For everyone else, it takes time and I thought he was pressing the last couple of games. And just let it come.

“It’s going to come and I’m going to be patient. So, you’re minutes won’t change I’m still going to throw you out there. If you’re great I’m going to keep you out there and if you’re awful I’m going to keep you out there.”

Barnes missed nearly all of training camp with a calf injury and four games into the regular season suffered a thigh contusion after being kneed by Houston’s Greg Smith. He missed three games before returning to the lineup to score nine points against the Timberwolves on Nov. 11 and was ejected for shoving Serge Ibaka two days later. He finished out that four-game home stand but was lost for a month on Nov. 18 when Zach Randolph inadvertently hit him in the eye while the two were scrambling for a loose ball.

For the most part, it has been a struggle ever since for Barnes.

“He’s been through a lot this year,” Rivers said. “He’s been injured, come back, been injured. It’s been tough to get in a rhythm. And you can see once he got it going [Wednesday] he was big for us.”

That was the Barnes the Clippers saw in 2012-13, when he, along with Jamal Crawford, keyed the best bench in the NBA. He was rewarded with the lengthiest contract of his career over the summer. But the injuries hindered him from picking up where he left off. 

But Wednesday was a start.

“We need [Barnes] to play well off of the bench,” J.J. Redick said. “He’s had some games where you can tell he’s getting back into his rhythm and tonight, he was full-fledged Matt Barnes as well all know him. So, it was good to see him play like that.”