Everything that could possibly go wrong in one half of football went wrong for the nation’s 12th-ranked team Saturday in an environment charged for an upset.

The South Carolina fans’ Internet message boards were purring. The entire coaching staff needed to go — probably a few players, too — by the time South Carolina trudged into the Bright House Stadium locker room down 10 points and unable to turn a single digit on its side of the ledger.

Doomsday had arrived for the Gamecocks in the fourth game of the season, at least according to the knee-jerkers on the message boards, much like it had by the fifth game a season ago.

The similarities were not lost on Steve Spurrier or Dylan Thompson.

“It was very similar to the Kentucky game (last season),” Spurrier said, “almost exactly like the Kentucky game.”

Thompson, called into emergency duty when starter Connor Shaw went down with an injury early in the game, chimed in with his halftime thoughts.

“I think last year we were down to Kentucky pretty good at halftime,” Thompson said, “and we came back from that. So it wasn’t really a big deal.”

South Carolina trailed Kentucky 17-7 in a first half that was equally disastrous to the Gamecocks’ showing by halftime Saturday. South Carolina rebounded to score 31 unanswered points against Kentucky and win going away.

The difference against Central Florida was that the Knights are a pretty darned good football team, and South Carolina — at least, according to Spurrier — has not learned how to handle prosperity with a second-half lead.

After building an 18-point lead by early in the fourth quarter, South Carolina allowed a couple of late Central Florida scores and hung on for the 3-point victory.

“I’m very happy that we won the game. We won the game,” Spurrier said. “It should not have gotten as close as it did, but it did.”

No matter how close the score got at the end, you cannot overlook the fact that South Carolina showed great resolve in surviving what could have been a knockout punch from Central Florida in the first half.

As painful as it might be for South Carolina, it is worth recounting some of what the Gamecocks overcame. Shaw was injured. Victor Hampton, for reasons perhaps known only to him, fielded a punt inside his 3-yard line and nearly got thrown for a safety. Strong safety Brison Williams was called for a targeting penalty that kept a Central Florida drive alive that led to a field goal.

Want more? Late in the second quarter, wide receiver Nick Jones dropped a deep pass from Thompson at the 5-yard line with a certain touchdown in his sight. A little later, with South Carolina driving for a score, the Gamecocks were flagged for a personal foul penalty that took them out of field-goal range.

Whew. South Carolina surely believed it was fortunate to be down only 10-0.

Spurrier said he changed shirts at halftime — going from a black golf shirt to a white one — because of the Orlando heat. The change could just as easily have been made for cleansing purposes.

“We weren’t zone reading any good and our passing game was not firing,” Spurrier said, “and we were only 10 down.”

Spurrier went back to basics at the suggestion of Sean Elliott, his co-offensive coordinator.

“Coach Elliott said, ‘Coach let’s just get in I right (formation) and I left (formation), the way they used to play 20 years ago, off tackle,” Spurrier said.

Actually, it was the way South Carolina played in the second half against Kentucky a season ago. Then it was Marcus Lattimore who pounded the Kentucky defensive line. After carrying the ball five times for 22 yards in the first half, Lattimore toted it another 18 times for 98 yards and two touchdowns the rest of the way.

Saturday, it was Mike Davis who became South Carolina’s go-to guy, off left tackle, off right tackle and even up the middle. Davis carried five times for 17 yards in a futile first half, then went between the tackles — or through them — 21 times for 150 yards and three touchdowns in the second half.

Leave it to Thompson to lend perspective to the South Carolina turnaround.

“Unfortunately, we let them come back into it at the end,” Thompson said. “But we went from 10-nothing to 28-10 out of the second half. That was impressive.”

Yes it was. Just like it was against Kentucky a season ago.